def test_find_data_files_accepts_filter(self): with mock.patch("os.walk") as mock_walk: mock_walk.return_value = EXAMPLE_WALK_OUTPUT data_files = setup_helpers.find_data_files( "/path", lambda x: x.endswith(".html")) self.assertEqual(data_files, EXPECTED_FILTERED_FILES_OUTPUT)
def test_find_data_files_generates_proper_structure(self): with mock.patch("os.walk") as mock_walk: mock_walk.return_value = EXAMPLE_WALK_OUTPUT data_files = setup_helpers.find_data_files("/path") mock_walk.assert_called_with("/path") self.assertEqual(data_files, EXPECTED_FILES_OUTPUT)