Skip to content

Commit

Permalink
TST: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cortadocodes committed Apr 11, 2024
1 parent 2d708fd commit 2677114
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/cloud/events/test_replayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def test_no_result_event(self):
"kind": "delivery_acknowledgement",
},
"attributes": {
"datetime": "2024-04-11T10:46:48.236064",
"uuid": "a9de11b1-e88f-43fa-b3a4-40a590c3443f",
"order": "0",
"question_uuid": "d45c7e99-d610-413b-8130-dd6eef46dda6",
"originator": "octue/test-service:1.0.0",
Expand Down
16 changes: 16 additions & 0 deletions tests/data/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"kind": "delivery_acknowledgement"
},
"attributes": {
"datetime": "2024-04-11T10:46:48.236064",
"uuid": "a9de11b1-e88f-43fa-b3a4-40a590c3443f",
"order": "0",
"question_uuid": "d45c7e99-d610-413b-8130-dd6eef46dda6",
"originator": "octue/test-service:1.0.0",
Expand Down Expand Up @@ -41,6 +43,8 @@
}
},
"attributes": {
"datetime": "2024-04-11T10:46:48.236064",
"uuid": "a9de11b1-e88f-43fa-b3a4-40a590c3443f",
"order": "1",
"question_uuid": "d45c7e99-d610-413b-8130-dd6eef46dda6",
"originator": "octue/test-service:1.0.0",
Expand Down Expand Up @@ -77,6 +81,8 @@
}
},
"attributes": {
"datetime": "2024-04-11T10:46:48.236064",
"uuid": "a9de11b1-e88f-43fa-b3a4-40a590c3443f",
"order": "2",
"question_uuid": "d45c7e99-d610-413b-8130-dd6eef46dda6",
"originator": "octue/test-service:1.0.0",
Expand Down Expand Up @@ -113,6 +119,8 @@
}
},
"attributes": {
"datetime": "2024-04-11T10:46:48.236064",
"uuid": "a9de11b1-e88f-43fa-b3a4-40a590c3443f",
"order": "3",
"question_uuid": "d45c7e99-d610-413b-8130-dd6eef46dda6",
"originator": "octue/test-service:1.0.0",
Expand Down Expand Up @@ -149,6 +157,8 @@
}
},
"attributes": {
"datetime": "2024-04-11T10:46:48.236064",
"uuid": "a9de11b1-e88f-43fa-b3a4-40a590c3443f",
"order": "4",
"question_uuid": "d45c7e99-d610-413b-8130-dd6eef46dda6",
"originator": "octue/test-service:1.0.0",
Expand Down Expand Up @@ -185,6 +195,8 @@
}
},
"attributes": {
"datetime": "2024-04-11T10:46:48.236064",
"uuid": "a9de11b1-e88f-43fa-b3a4-40a590c3443f",
"order": "5",
"question_uuid": "d45c7e99-d610-413b-8130-dd6eef46dda6",
"originator": "octue/test-service:1.0.0",
Expand Down Expand Up @@ -216,6 +228,8 @@
"output_values": [1, 2, 3, 4, 5]
},
"attributes": {
"datetime": "2024-04-11T10:46:48.236064",
"uuid": "a9de11b1-e88f-43fa-b3a4-40a590c3443f",
"order": "6",
"question_uuid": "d45c7e99-d610-413b-8130-dd6eef46dda6",
"originator": "octue/test-service:1.0.0",
Expand All @@ -231,6 +245,8 @@
"kind": "heartbeat"
},
"attributes": {
"datetime": "2024-04-11T10:46:48.236064",
"uuid": "a9de11b1-e88f-43fa-b3a4-40a590c3443f",
"order": "7",
"question_uuid": "d45c7e99-d610-413b-8130-dd6eef46dda6",
"originator": "octue/test-service:1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_load_test_fixture_from_downloaded_diagnostics(self):
self.assertEqual(len(child_emulators), 1)
self.assertEqual(child_emulators[0].id, f"octue/my-child:{MOCK_SERVICE_REVISION_TAG}")
self.assertEqual(
child_emulators[0].messages[2:],
child_emulators[0].events[2:],
[
{"kind": "monitor_message", "data": {"sample": "data"}},
{"kind": "result", "output_values": [1, 2, 3, 4, 5]},
Expand Down

0 comments on commit 2677114

Please sign in to comment.