def setUp(self): self.image_path = get_file_path("test_jpg.jpg") self.img_bytes = azure_services.get_file_bytes(self.image_path)
def test_get_file_bytes_correct_path_returns_bytes(self): """ Check that get_file_bytes returns a bytes object when provided with the correct path """ img = azure_services.get_file_bytes(self.image_path) self.assertTrue(isinstance(img, bytes))
def test_get_file_bytes_wrong_path_returns_none(self): """ Check that get_file_bytes returns none with an incorrect image path """ img = azure_services.get_file_bytes("fake_file.jpg") self.assertIsNone(img)
def setUp(self): self.image_path = get_file_path("test_jpg.jpg") self.img_bytes = azure_services.get_file_bytes(self.image_path) self.bf = azure_services.BasisFunctions()