Skip to content

Commit

Permalink
Test composing non-existent blobs
Browse files Browse the repository at this point in the history
  • Loading branch information
oittaa committed Feb 17, 2021
1 parent ae25791 commit f4ad59b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,15 @@ def test_compose_wo_content_type_set(self):
self.assertEqual(composed, data_1 + data_2)
self.assertEqual(destination.content_type, "text/plain")

def test_compose_nonexistent(self):
bucket = self._client.create_bucket("compose_test")
source_1 = bucket.blob("source-1")
source_2 = bucket.blob("source-2")

destination = bucket.blob("destination")
with self.assertRaises(NotFound):
destination.compose([source_1, source_2])


class HttpEndpointsTest(ServerBaseCase):
""" Tests for the HTTP endpoints defined by server.HANDLERS. """
Expand Down

0 comments on commit f4ad59b

Please sign in to comment.