Skip to content

Commit

Permalink
Make the test a bit more robust.
Browse files Browse the repository at this point in the history
  • Loading branch information
itamarst committed Nov 30, 2021
1 parent f3e17f8 commit 8fdf728
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_storage_filecache.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ def test_body_actually_stored_separately(self, sess):
# actually came from separate file.
with open(self.cache._fn(url), "rb") as f:
assert body not in f.read()
with open(self.cache._fn(url) + ".body", "rb") as f:
assert body == f.read()
with open(self.cache._fn(url) + ".body", "wb") as f:
f.write(b"CORRUPTED")
response2 = sess.get(url)
Expand Down

0 comments on commit 8fdf728

Please sign in to comment.