def test_delete_one(self): with deepstar_path(): with mock.patch.dict(os.environ, {'DEBUG_LEVEL': '0'}): route_handler = VideoCommandLineRouteHandler() video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa route_handler.insert_file(video_0001) video_model = VideoModel() old = video_model.select(1) self.assertIsNotNone(old) args = ['main.py', 'delete', 'videos', '1'] opts = {} route_handler = VideoCommandLineRouteHandler() try: sys.stdout = StringIO() route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout self.assertEqual(actual, 'Video 1 was successfully deleted') # db + files new = video_model.select(1) self.assertIsNone(new) self.assertFalse(os.path.exists(VideoFile.path(old[2])))
def test_select_export_dir_many(self): with deepstar_path(): with mock.patch.dict(os.environ, {'DEBUG_LEVEL': '0'}): route_handler = VideoCommandLineRouteHandler() video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa route_handler.insert_file(video_0001) route_handler.select_extract([1]) route_handler.select_extract([1]) route_handler.select_extract([1]) tmpdir = os.environ['DEEPSTAR_PATH'] + '/test' os.mkdir(tmpdir) args = ['main.py', 'select', 'frame_sets', '1,2-3', 'export', 'dir', tmpdir] # noqa opts = {} route_handler = FrameSetCommandLineRouteHandler() try: sys.stdout = StringIO() with mock.patch.dict(os.environ, {'MODEL_LIST_LENGTH': '2'}): route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout self.assertEqual(actual, f'15 frames were successfully exported to {tmpdir}') # noqa
def test_list(self): with deepstar_path(): video_model = VideoModel() video_model.insert('test1', 'test2') video_model.insert('test3', 'test4') video_model.insert('test5', 'test6') args = ['main.py', 'list', 'videos'] opts = {} route_handler = VideoCommandLineRouteHandler() try: sys.stdout = StringIO() route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout expected = textwrap.dedent(''' 3 results id | uri | filename | description --------------------------------- 1 | test1 | test2 | None 2 | test3 | test4 | None 3 | test5 | test6 | None''').strip() self.assertEqual(actual, expected)
def test_select_clone_many(self): with deepstar_path(): with mock.patch.dict(os.environ, {'DEBUG_LEVEL': '0'}): route_handler = VideoCommandLineRouteHandler() video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa route_handler.insert_file(video_0001) route_handler.insert_file(video_0001) route_handler.insert_file(video_0001) route_handler.select_extract([1, 2, 3]) args = ['main.py', 'select', 'frame_sets', '1-2,3', 'clone'] opts = {} route_handler = FrameSetCommandLineRouteHandler() try: sys.stdout = StringIO() with mock.patch.dict(os.environ, {'MODEL_LIST_LENGTH': '2'}): route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout expected = textwrap.dedent(''' frame_set_id=4, fk_videos=1 frame_set_id=5, fk_videos=2 frame_set_id=6, fk_videos=3''').strip() self.assertEqual(actual, expected)
def test_delete_many(self): with deepstar_path(): with mock.patch.dict(os.environ, {'DEBUG_LEVEL': '0'}): route_handler = VideoCommandLineRouteHandler() video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa route_handler.insert_file(video_0001) route_handler.insert_file(video_0001) route_handler.insert_file(video_0001) route_handler.select_extract([1, 2, 3]) args = ['main.py', 'delete', 'frame_sets', '1-2,3'] opts = {} route_handler = FrameSetCommandLineRouteHandler() try: sys.stdout = StringIO() route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout expected = textwrap.dedent(''' Frame set 1 was successfully deleted Frame set 2 was successfully deleted Frame set 3 was successfully deleted''').strip() self.assertEqual(actual, expected)
def test_select_deploy(self): with deepstar_path(): video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa shutil.copyfile(video_0001, VideoFile.path('video_0001.mp4')) VideoModel().insert('test', 'video_0001.mp4') class TestPlugin: def video_select_deploy(self, video_id, opts): pass args = ['main.py', 'select', 'videos', '1', 'deploy', 'test'] opts = {} route_handler = VideoCommandLineRouteHandler() try: sys.stdout = StringIO() with mock.patch.dict(Plugin._map, {'video_select_deploy': {'test': TestPlugin}}): # noqa route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout self.assertEqual(actual, 'success')
def test_select_extract_many(self): with deepstar_path(): video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa shutil.copyfile(video_0001, VideoFile.path('video_0001.mp4')) shutil.copyfile(video_0001, VideoFile.path('video_0002.mp4')) shutil.copyfile(video_0001, VideoFile.path('video_0003.mp4')) VideoModel().insert('test', 'video_0001.mp4') VideoModel().insert('test', 'video_0002.mp4') VideoModel().insert('test', 'video_0003.mp4') args = ['main.py', 'select', 'videos', '1-2,3', 'extract'] opts = {} route_handler = VideoCommandLineRouteHandler() try: sys.stdout = StringIO() route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout expected = textwrap.dedent(''' frame_set_id=1, video_id=1 frame_set_id=2, video_id=2 frame_set_id=3, video_id=3 ''').strip() self.assertEqual(actual, expected)
def test_select_extract_one(self): with deepstar_path(): with mock.patch.dict(os.environ, {'DEBUG_LEVEL': '0'}): route_handler = VideoCommandLineRouteHandler() video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa route_handler.insert_file(video_0001) route_handler.select_extract([1]) class TestPlugin: def frame_set_select_extract(self, frame_set_id, opts): return TransformSetModel().insert('test', frame_set_id, None) # noqa args = ['main.py', 'select', 'frame_sets', '1', 'extract', 'test'] # noqa opts = {} route_handler = FrameSetCommandLineRouteHandler() try: sys.stdout = StringIO() with mock.patch.dict(Plugin._map, {'frame_set_select_extract': {'test': TestPlugin}}): # noqa route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout self.assertEqual(actual, 'transform_set_id=1, name=test, fk_frame_sets=1, fk_prev_transform_sets=None') # noqa
def test_select_extract_face(self): with deepstar_path(): with mock.patch.dict(os.environ, {'DEBUG_LEVEL': '0'}): route_handler = VideoCommandLineRouteHandler() video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa route_handler.insert_file(video_0001) route_handler.select_extract([1]) args = ['main.py', 'select', 'frame_sets', '1', 'extract', 'face'] # noqa opts = {} route_handler = FrameSetCommandLineRouteHandler() try: sys.stdout = StringIO() route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout self.assertEqual(actual, 'transform_set_id=1, name=face, fk_frame_sets=1, fk_prev_transform_sets=None') # noqa # db result = TransformSetModel().select(1) self.assertEqual(result, (1, 'face', 1, None)) result = TransformModel().list(1) self.assertEqual(len(result), 5) t = list(result[0]) json.loads(t.pop(3)) self.assertEqual(t, [1, 1, 1, 0]) t = list(result[1]) json.loads(t.pop(3)) self.assertEqual(t, [2, 1, 2, 0]) t = list(result[2]) json.loads(t.pop(3)) self.assertEqual(t, [3, 1, 3, 0]) t = list(result[3]) json.loads(t.pop(3)) self.assertEqual(t, [4, 1, 4, 0]) t = list(result[4]) json.loads(t.pop(3)) self.assertEqual(t, [5, 1, 5, 0]) # files p1 = TransformSetSubDir.path(1) # transforms self.assertTrue(os.path.isfile(TransformFile.path(p1, 1, 'jpg'))) self.assertTrue(os.path.isfile(TransformFile.path(p1, 2, 'jpg'))) self.assertTrue(os.path.isfile(TransformFile.path(p1, 3, 'jpg'))) self.assertTrue(os.path.isfile(TransformFile.path(p1, 4, 'jpg'))) self.assertTrue(os.path.isfile(TransformFile.path(p1, 5, 'jpg')))
def test_select_clone_one(self): with deepstar_path(): with mock.patch.dict(os.environ, {'DEBUG_LEVEL': '0'}): route_handler = VideoCommandLineRouteHandler() video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa route_handler.insert_file(video_0001) route_handler.select_extract([1]) args = ['main.py', 'select', 'frame_sets', '1', 'clone'] opts = {} route_handler = FrameSetCommandLineRouteHandler() try: sys.stdout = StringIO() with mock.patch.dict(os.environ, {'MODEL_LIST_LENGTH': '4'}): route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout self.assertEqual(actual, 'frame_set_id=2, fk_videos=1') # db result = FrameSetModel().select(2) self.assertEqual(result, (2, 1)) result = FrameModel().list(2) self.assertEqual(len(result), 5) self.assertEqual(result[0], (6, 2, 0)) self.assertEqual(result[1], (7, 2, 0)) self.assertEqual(result[2], (8, 2, 0)) self.assertEqual(result[3], (9, 2, 0)) self.assertEqual(result[4], (10, 2, 0)) # files p1 = FrameSetSubDir.path(2) # frames self.assertTrue(os.path.isfile(FrameFile.path(p1, 6, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 7, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 8, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 9, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 10, 'jpg'))) # thumbnails self.assertTrue(os.path.isfile(FrameFile.path(p1, 6, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 7, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 8, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 9, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 10, 'jpg', '192x192'))) # noqa
def test_delete_one(self): with deepstar_path(): with mock.patch.dict(os.environ, {'DEBUG_LEVEL': '0'}): route_handler = VideoCommandLineRouteHandler() video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa route_handler.insert_file(video_0001) route_handler.select_extract([1]) # files self.assertTrue(os.path.exists(FrameSetSubDir.path(1))) # db frame_set_model = FrameSetModel() self.assertIsNotNone(frame_set_model.select(1)) frame_model = FrameModel() self.assertIsNotNone(frame_model.select(1)) self.assertIsNotNone(frame_model.select(2)) self.assertIsNotNone(frame_model.select(3)) self.assertIsNotNone(frame_model.select(4)) self.assertIsNotNone(frame_model.select(5)) args = ['main.py', 'delete', 'frame_sets', '1'] opts = {} route_handler = FrameSetCommandLineRouteHandler() try: sys.stdout = StringIO() route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout self.assertEqual(actual, 'Frame set 1 was successfully deleted') # db self.assertIsNone(frame_set_model.select(1)) self.assertIsNone(frame_model.select(1)) self.assertIsNone(frame_model.select(2)) self.assertIsNone(frame_model.select(3)) self.assertIsNone(frame_model.select(4)) self.assertIsNone(frame_model.select(5)) # files self.assertFalse(os.path.exists(FrameSetSubDir.path(1)))
def test_select_extract_one(self): with deepstar_path(): video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa shutil.copyfile(video_0001, VideoFile.path('video_0001.mp4')) VideoModel().insert('test', 'video_0001.mp4') args = ['main.py', 'select', 'videos', '1', 'extract'] opts = {} route_handler = VideoCommandLineRouteHandler() try: sys.stdout = StringIO() route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout self.assertEqual(actual, 'frame_set_id=1, video_id=1') # db result = FrameSetModel().select(1) self.assertEqual(result, (1, 1)) result = FrameModel().list(1) self.assertEqual(len(result), 5) self.assertEqual(result[0], (1, 1, 0)) self.assertEqual(result[1], (2, 1, 0)) self.assertEqual(result[2], (3, 1, 0)) self.assertEqual(result[3], (4, 1, 0)) self.assertEqual(result[4], (5, 1, 0)) # files p1 = FrameSetSubDir.path(1) # frames self.assertTrue(os.path.isfile(FrameFile.path(p1, 1, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 2, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 3, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 4, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 5, 'jpg'))) # thumbnails self.assertTrue(os.path.isfile(FrameFile.path(p1, 1, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 2, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 3, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 4, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 5, 'jpg', '192x192'))) # noqa
def test_select_deploy_fails_to_select_a_video(self): with deepstar_path(): args = ['main.py', 'select', 'videos', '1', 'deploy', 'test'] opts = {} route_handler = VideoCommandLineRouteHandler() with self.assertRaises(CommandLineRouteHandlerError): try: route_handler.handle(args, opts) except CommandLineRouteHandlerError as e: self.assertEqual(e.message, f'Video with ID 00000001 not found') # noqa raise e
def test_insert_file_fails_to_open_a_video_file(self): with deepstar_path(): args = ['main.py', 'insert', 'videos', 'file', 'test'] opts = {} route_handler = VideoCommandLineRouteHandler() with mock.patch.dict(os.environ, {'DEBUG_LEVEL': '0'}): with self.assertRaises(CommandLineRouteHandlerError): try: route_handler.handle(args, opts) except CommandLineRouteHandlerError as e: self.assertEqual(e.message, 'File test not found') raise e
def test_usage(self): with deepstar_path(): route_handler = VideoCommandLineRouteHandler() args = ['main.py', 'usage', 'videos'] opts = {} try: sys.stdout = StringIO() route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ self.assertTrue('Usage - Videos' in actual)
def test_select_deploy_fails_to_get_a_plugin(self): with deepstar_path(): VideoModel().insert('test', 'test') args = ['main.py', 'select', 'videos', '1', 'deploy', 'test'] opts = {} route_handler = VideoCommandLineRouteHandler() with self.assertRaises(CommandLineRouteHandlerError): try: route_handler.handle(args, opts) except CommandLineRouteHandlerError as e: self.assertEqual(e.message, "'test' is not a valid frame set extraction plugin name") # noqa raise e
def test_select_extract_fails_to_open_a_video_file(self): with deepstar_path(): VideoModel().insert('test', 'test') args = ['main.py', 'select', 'videos', '1', 'extract'] opts = {} route_handler = VideoCommandLineRouteHandler() with self.assertRaises(CommandLineRouteHandlerError): try: route_handler.handle(args, opts) except CommandLineRouteHandlerError as e: self.assertEqual(e.message, f'OpenCV VideoCapture isOpened returned false for {VideoFile.path("test")}') # noqa raise e
def test_list(self): with deepstar_path(): with mock.patch.dict(os.environ, {'DEBUG_LEVEL': '0'}): route_handler = VideoCommandLineRouteHandler() video_0001 = os.path.dirname(os.path.realpath( __file__)) + '/../../support/video_0001.mp4' # noqa route_handler.insert_file(video_0001) route_handler.select_extract([1]) self.mock_transform_set() args = ['main.py', 'list', 'transform_sets', '1', 'transforms'] opts = {} route_handler = TransformCommandLineRouteHandler() try: sys.stdout = StringIO() with mock.patch.dict(os.environ, {'MODEL_LIST_LENGTH': '2'}): route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout expected = \ '5 results\n' \ 'id | fk_transform_sets | fk_frames | metadata | rejected | ' \ '(width | height)\n' \ '-----------------------------------------------------------' \ '----------------\n' \ '1 | 1 | 1 | {} | 0 | (309 | 404)\n' \ '2 | 1 | 2 | {} | 0 | (309 | 404)\n' \ '3 | 1 | 3 | {} | 0 | (309 | 404)\n' \ '4 | 1 | 4 | {} | 0 | (309 | 404)\n' \ '5 | 1 | 5 | {} | 0 | (309 | 404)' self.assertEqual(actual, expected)
def test_list(self): with deepstar_path(): with mock.patch.dict(os.environ, {'DEBUG_LEVEL': '0'}): route_handler = VideoCommandLineRouteHandler() video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa route_handler.insert_file(video_0001) route_handler.select_extract([1]) args = ['main.py', 'list', 'frame_sets', '1', 'frames'] opts = {} route_handler = FrameCommandLineRouteHandler() try: sys.stdout = StringIO() with mock.patch.dict(os.environ, {'MODEL_LIST_LENGTH': '2'}): route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout expected = textwrap.dedent(''' 5 results id | fk_frame_sets | rejected | (width | height) ------------------------------------------------ 1 | 1 | 0 | (1280 | 720) 2 | 1 | 0 | (1280 | 720) 3 | 1 | 0 | (1280 | 720) 4 | 1 | 0 | (1280 | 720) 5 | 1 | 0 | (1280 | 720)''').strip() self.assertEqual(actual, expected)
def test_select_merge_rejected(self): with deepstar_path(): with mock.patch.dict(os.environ, {'DEBUG_LEVEL': '0'}): route_handler = VideoCommandLineRouteHandler() video_0001 = os.path.dirname(os.path.realpath(__file__)) + '/../../support/video_0001.mp4' # noqa route_handler.insert_file(video_0001) route_handler.insert_file(video_0001) route_handler.insert_file(video_0001) route_handler.select_extract([1, 2, 3]) FrameModel().update(15, rejected=1) args = ['main.py', 'select', 'frame_sets', '1-2,3', 'merge'] opts = {} route_handler = FrameSetCommandLineRouteHandler() try: sys.stdout = StringIO() with mock.patch.dict(os.environ, {'MODEL_LIST_LENGTH': '4'}): route_handler.handle(args, opts) actual = sys.stdout.getvalue().strip() finally: sys.stdout = sys.__stdout__ # stdout self.assertEqual(actual, 'frame_set_id=4, fk_videos=None') # db result = FrameSetModel().select(4) self.assertEqual(result, (4, None)) result = FrameModel().list(4) self.assertEqual(len(result), 14) self.assertEqual(result[0], (16, 4, 0)) self.assertEqual(result[1], (17, 4, 0)) self.assertEqual(result[2], (18, 4, 0)) self.assertEqual(result[3], (19, 4, 0)) self.assertEqual(result[4], (20, 4, 0)) self.assertEqual(result[5], (21, 4, 0)) self.assertEqual(result[6], (22, 4, 0)) self.assertEqual(result[7], (23, 4, 0)) self.assertEqual(result[8], (24, 4, 0)) self.assertEqual(result[9], (25, 4, 0)) self.assertEqual(result[10], (26, 4, 0)) self.assertEqual(result[11], (27, 4, 0)) self.assertEqual(result[12], (28, 4, 0)) self.assertEqual(result[13], (29, 4, 0)) # files p1 = FrameSetSubDir.path(4) # frames self.assertTrue(os.path.isfile(FrameFile.path(p1, 16, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 17, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 18, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 19, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 20, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 21, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 22, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 23, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 24, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 25, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 26, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 27, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 28, 'jpg'))) self.assertTrue(os.path.isfile(FrameFile.path(p1, 29, 'jpg'))) # thumbnails self.assertTrue(os.path.isfile(FrameFile.path(p1, 16, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 17, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 18, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 19, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 20, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 21, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 22, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 23, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 24, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 25, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 26, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 27, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 28, 'jpg', '192x192'))) # noqa self.assertTrue(os.path.isfile(FrameFile.path(p1, 29, 'jpg', '192x192'))) # noqa