def topic(self): storage = NoStorage(None) storage.put_crypto(IMAGE_URL % 2) return storage.get_crypto(IMAGE_URL % 2)
def topic(self): storage = NoStorage(None) storage.put_detector_data(IMAGE_URL % 3, "some data") return storage.get_detector_data(IMAGE_URL % 3)
def topic(self): storage = NoStorage(None) return storage.exists(IMAGE_URL % 1)
def topic(self): storage = NoStorage(None) return storage.remove(IMAGE_URL % 1)
def load_override(self, foo, bar): self.context.modules.storage = NoStorage(None) return old_load(self, foo, bar)
def topic(self): storage = NoStorage(None) storage.put(IMAGE_URL % 1, IMAGE_BYTES) return storage.get(IMAGE_URL % 1)
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()
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()
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()
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()
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()
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()
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()
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()
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()