示例#1
0
        def topic(self):
            storage = NoStorage(None)
            storage.put_crypto(IMAGE_URL % 2)

            return storage.get_crypto(IMAGE_URL % 2)
示例#2
0
 def topic(self):
     storage = NoStorage(None)
     storage.put_detector_data(IMAGE_URL % 3, "some data")
     return storage.get_detector_data(IMAGE_URL % 3)
示例#3
0
 def topic(self):
     storage = NoStorage(None)
     return storage.exists(IMAGE_URL % 1)
示例#4
0
 def topic(self):
     storage = NoStorage(None)
     return storage.remove(IMAGE_URL % 1)
示例#5
0
 def load_override(self, foo, bar):
     self.context.modules.storage = NoStorage(None)
     return old_load(self, foo, bar)
示例#6
0
 def topic(self):
     storage = NoStorage(None)
     storage.put(IMAGE_URL % 1, IMAGE_BYTES)
     return storage.get(IMAGE_URL % 1)
示例#7
0
 async def test_stores_crypto_should_be_null(self):
     iurl = self.get_image_url("source.jpg")
     storage = NoStorage(None)
     await storage.put_crypto(iurl)
     got_crypto = await storage.get_crypto(iurl)
     expect(got_crypto).to_be_null()
示例#8
0
 async def test_detector_data_should_be_null(self):
     iurl = self.get_image_url("source.jpg")
     storage = NoStorage(None)
     await storage.put_detector_data(iurl, "some data")
     data = await storage.get_detector_data(iurl)
     expect(data).to_be_null()
示例#9
0
 async def test_store_knows_no_image(self):
     iurl = self.get_image_url("source.jpg")
     storage = NoStorage(None)
     exists = await storage.exists(iurl)
     expect(exists).to_be_false()
示例#10
0
 async def test_removes_image_should_be_null(self):
     iurl = self.get_image_url("source.jpg")
     storage = NoStorage(None)
     removed = await storage.remove(iurl)
     expect(removed).to_be_null()
示例#11
0
 async def test_store_image_should_be_null(self):
     iurl = self.get_image_url("source.jpg")
     storage = NoStorage(None)
     stored = await storage.get(iurl)
     expect(stored).to_be_null()
示例#12
0
 def test_detector_data_should_be_null(self):
     iurl = self.get_image_url('source.jpg')
     storage = NoStorage(None)
     storage.put_detector_data(iurl, "some data")
     data = storage.get_detector_data(iurl)
     expect(data.result()).to_be_null()
示例#13
0
 def test_stores_crypto_should_be_null(self):
     iurl = self.get_image_url('source.jpg')
     storage = NoStorage(None)
     storage.put_crypto(iurl)
     got_crypto = storage.get_crypto(iurl)
     expect(got_crypto.result()).to_be_null()
示例#14
0
 def test_store_knows_no_image(self):
     iurl = self.get_image_url('source.jpg')
     storage = NoStorage(None)
     exists = storage.exists(iurl)
     expect(exists.result()).to_be_false()
示例#15
0
 def test_store_image_should_be_null(self):
     iurl = self.get_image_url('source.jpg')
     storage = NoStorage(None)
     stored = storage.get(iurl)
     expect(stored.result()).to_be_null()