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 topic(self): storage = NoStorage(None) storage.put(IMAGE_URL % 1, IMAGE_BYTES) return storage.get(IMAGE_URL % 1)
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_removes_image_should_be_null(self): iurl = self.get_image_url('source.jpg') storage = NoStorage(None) removed = storage.remove(iurl) expect(removed).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()