def test_load_images(self, mock_listdir): mock_listdir.return_value = ["test.txt", "test2.jpg"] directory = "/home/test/" returned_images = Application.load_image_list(directory) self.assertListEqual(["test2.jpg"], returned_images)
def test_load_images_with_wrong_filetype(self, mock_listdir): mock_listdir.return_value = ["test.txt", "test2"] returned_images = Application.load_image_list("/home/test/") self.assertListEqual([], returned_images)