def test_rewrite_xml_file_no_changes(self, mock_path_join): #given helpers.create_folder('tests/files_dest_ApplyVersionNumber') shutil.copy(u'tests/files_source/ApplyVersionNumber/elife-15224-v1-rewritten.xml', u'tests/files_dest_ApplyVersionNumber/elife-15224-v1.xml') mock_path_join.return_value = u'tests/files_dest_ApplyVersionNumber/elife-15224-v1.xml' #when self.applyversionnumber.rewrite_xml_file(u'elife-15224-v1.xml', example_file_name_map) #then with open(u'tests/files_dest_ApplyVersionNumber/elife-15224-v1.xml', 'r') as result_file: result_file_content = result_file.read() with open(u'tests/files_source/ApplyVersionNumber/elife-15224-v1-rewritten.xml', 'r') as expected_file: expected_file_content = expected_file.read() self.assertEqual(result_file_content, expected_file_content) helpers.delete_folder('tests/files_dest_ApplyVersionNumber', True)
def tearDown(self): helpers.delete_folder('tests/test_cdn', True) helpers.delete_folder(self.resize_images_start_folder, True)
def tearDown(self): helpers.delete_files_in_folder('tests/tmp', filter_out=['.keepme']) helpers.delete_files_in_folder( testdata.ExpandArticle_files_dest_folder) helpers.delete_folder(testdata.ExpandArticle_files_dest_folder)
def tearDown(self): helpers.delete_folder(self.test_dest_folder, True)
def tearDown(self): helpers.delete_folder('tests/test_cdn', True) helpers.delete_folder(self.resize_images_start_folder, True)
def tearDown(self): helpers.delete_files_in_folder('tests/tmp', filter_out=['.keepme']) helpers.delete_files_in_folder(testdata.ExpandArticle_files_dest_folder) helpers.delete_folder(testdata.ExpandArticle_files_dest_folder)