Skip to content

Commit 4c337c8

Browse files
committed
slightly better test for invalid task
1 parent c147a03 commit 4c337c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mapswipe_workers/tests/integration/test_transfer_results_invalid_results.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def test_invalid_task_in_result(self):
2323
2424
In this test the results contain an additional task.
2525
This should raise a Database error due to a foreign key violation.
26+
Because results could not be stored in Postgres DB,
27+
they should also NOT be deleted in Firebase.
2628
"""
2729

2830
test_dir = os.path.dirname(__file__)
@@ -42,7 +44,7 @@ def test_invalid_task_in_result(self):
4244

4345
fb_db = auth.firebaseDB()
4446
ref = fb_db.reference("v2/results/{0}".format(self.project_id))
45-
self.assertIsNotNone(ref.get())
47+
self.assertDictEqual(ref.get(shallow=True), {"g115": True})
4648

4749

4850
if __name__ == "__main__":

0 commit comments

Comments
 (0)