Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PSNAppz authored Dec 11, 2024
1 parent 24118e6 commit 18094ed
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions g2p_social_registry/tests/test_g2p_que_id_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def setUp(self):
self.g2p_queue = self.env["g2p.que.id.generation"].create(
{
"registrant_id": self.partner1.id,
"id_generation_request_status": "pending",
"id_generation_update_status": "not_applicable",
"id_generation_request_status": "PENDING",
"id_generation_update_status": "NOT_APPLICABLE",
}
)

Expand All @@ -30,12 +30,12 @@ def test_create_g2p_queue_record(self):
)
self.assertEqual(
self.g2p_queue.id_generation_request_status,
"pending",
"PENDING",
"Default ID Generation Request Status should be 'pending'.",
)
self.assertEqual(
self.g2p_queue.id_generation_update_status,
"not_applicable",
"NOT_APPLICABLE",
"Default ID Generation Update Status should be 'not_applicable'.",
)
self.assertEqual(
Expand Down Expand Up @@ -69,8 +69,8 @@ def test_multiple_g2p_queue_records(self):
record2 = self.env["g2p.que.id.generation"].create(
{
"registrant_id": self.partner2.id,
"id_generation_request_status": "approved",
"id_generation_update_status": "in_progress",
"id_generation_request_status": "COMPLETED",
"id_generation_update_status": "PENDING",
"last_attempt_error_code_request": "ERR001",
"last_attempt_datetime_request": fields.Datetime.now(),
}
Expand All @@ -84,12 +84,12 @@ def test_multiple_g2p_queue_records(self):
)
self.assertEqual(
record2.id_generation_request_status,
"approved",
"COMPLETED",
"ID Generation Request Status should be 'approved'.",
)
self.assertEqual(
record2.id_generation_update_status,
"in_progress",
"PENDING",
"ID Generation Update Status should be 'in_progress'.",
)

Expand All @@ -106,20 +106,20 @@ def test_field_assignments(self):
"""
self.g2p_queue.write(
{
"id_generation_request_status": "approved",
"id_generation_update_status": "completed",
"id_generation_request_status": "COMPLETED",
"id_generation_update_status": "COMPLETED",
"number_of_attempts_request": 1,
}
)

self.assertEqual(
self.g2p_queue.id_generation_request_status,
"approved",
"COMPLETED",
"ID Generation Request Status should be updated to 'approved'.",
)
self.assertEqual(
self.g2p_queue.id_generation_update_status,
"completed",
"COMPLETED",
"ID Generation Update Status should be updated to 'completed'.",
)
self.assertEqual(
Expand All @@ -138,12 +138,12 @@ def test_default_values_on_creation(self):

self.assertEqual(
new_record.id_generation_request_status,
"pending",
"PENDING",
"Default ID Generation Request Status should be 'pending'.",
)
self.assertEqual(
new_record.id_generation_update_status,
"not_applicable",
"NOT_APPLICABLE",
"Default ID Generation Update Status should be 'not_applicable'.",
)
self.assertEqual(
Expand Down

0 comments on commit 18094ed

Please sign in to comment.