def test_preprocessing(self): inp = inputs.ImageUpload() array = inp.preprocess(BASE64_IMG) self.assertEqual(array.shape, (1, 224, 224, 3))
def test_preprocessing(self): inp = inputs.ImageUpload() inp.image_height = 48 inp.image_width = 48 array = inp.preprocess(BASE64_IMG) self.assertEqual(array.shape, (1, 48, 48, 3))
def test_path_exists(self): inp = inputs.ImageUpload() path = inputs.BASE_INPUT_INTERFACE_JS_PATH.format(inp.get_name()) self.assertTrue(os.path.exists(os.path.join(PACKAGE_NAME, path)))