Skip to content

Commit

Permalink
Add MediaFileUpload test where file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea committed Dec 9, 2020
1 parent a6e651d commit 7acba97
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_http.py
Expand Up @@ -248,6 +248,10 @@ def test_media_file_upload_to_from_json(self):
self.assertEqual(500, new_upload.chunksize())
self.assertEqual(b"PNG", new_upload.getbytes(1, 3))

def test_media_file_upload_raises_on_file_not_found(self):
with self.assertRaises(FileNotFoundError):
MediaFileUpload(datafile("missing.png"))

def test_media_file_upload_raises_on_invalid_chunksize(self):
self.assertRaises(
InvalidChunkSizeError,
Expand Down

0 comments on commit 7acba97

Please sign in to comment.