Skip to content

Commit

Permalink
Merge pull request #35128 from dimagi/dm/check-cleanup
Browse files Browse the repository at this point in the history
Add assertion to rule out bad test cleanup
  • Loading branch information
millerdev authored Sep 16, 2024
2 parents 1ab1945 + 1d4c6c5 commit 6e8ad15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions corehq/apps/dump_reload/tests/test_couch_dump_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ def test_multimedia(self):
image_data = f.read()

image = CommCareImage.get_by_data(image_data)
assert not image.blobs, (
f"Expected empty blobs, got {image.blobs!r}. Failure indicates"
"incomplete cleanup by a test that ran before this one."
)
image.attach_data(image_data, original_filename='logo.png')
image.add_domain(self.domain_name)
self.assertEqual(image_data, image.get_display_file(False))
Expand Down

0 comments on commit 6e8ad15

Please sign in to comment.