def test_get_old_filename(self): parts = git_diff.get_parts(SAMPLE_DIFF) old_filename = git_diff.get_old_filename(parts[0]) self.assertEqual(old_filename, 'group_vars/foo')
def test_get_old_filename_for_added_file(self): parts = git_diff.get_parts(ADDED_FILE_DIFF) old_filename = git_diff.get_old_filename(parts[0]) self.assertEqual(old_filename, '/dev/null')