Ejemplo n.º 1
0
 def test_load_images(self, mock_listdir):
     mock_listdir.return_value = ["test.txt", "test2.jpg"]
     directory = "/home/test/"
     returned_images = Controller.load_image_list(directory)
     self.assertListEqual(["test2.jpg"], returned_images)
Ejemplo n.º 2
0
 def test_load_images_with_wrong_filetype(self, mock_listdir):
     mock_listdir.return_value = ["test.txt", "test2"]
     returned_images = Controller.load_image_list("/home/test/")
     self.assertListEqual([], returned_images)