Beispiel #1
0
 def test_existing_object(self, s3):
     s3.get.return_value = 'foo'
     self.assertEqual(giraffe.get_object_or_none(self.bucket, "redbull.jpg"), 'foo')
Beispiel #2
0
 def test_existing_object(self, s3):
     s3.get.return_value = 'foo'
     self.assertEqual(
         giraffe.get_object_or_none(self.bucket, "redbull.jpg"), 'foo')
Beispiel #3
0
 def test_missing_object(self, s3):
     s3.get.side_effect = make_httperror(404)
     self.assertIsNone(giraffe.get_object_or_none(self.bucket, "redbull.jpg"))
Beispiel #4
0
 def test_missing_object(self, s3):
     s3.get.side_effect = make_httperror(404)
     self.assertIsNone(
         giraffe.get_object_or_none(self.bucket, "redbull.jpg"))