Fix test : do not consider deleted migrations
* Change way to detect deleted migrations (diff-filter of 'git diff' command)
This commit is contained in:
1 parent
fffdf5714e
commit
698e658faa
15 files changed
+46
-14
No files matched your search
@@ -116,6 +116,21 @@ class CallLinterFromCommandLineTest(unittest.TestCase):
|
||||
self.assertTrue(lines[2].endswith('IGNORE'))
|
||||
|
||||
def test_call_linter_cmd_line_git_id(self):
|
||||
cmd = '{0} {1} d7125d5f4f0cc9623f670a66c54f131acc50032d'.format(
|
||||
self.linter_exec,
|
||||
fixtures.MULTI_COMMIT_PROJECT)
|
||||
fixtures.prepare_git_project(fixtures.MULTI_COMMIT_PROJECT)
|
||||
|
||||
process = Popen(
|
||||
cmd, shell=True, stdout=PIPE, stderr=PIPE)
|
||||
process.wait()
|
||||
self.assertEqual(process.returncode, 0)
|
||||
lines = list(map(utils.clean_bytes_to_str, process.stdout.readlines()))
|
||||
self.assertEqual(len(lines), 3)
|
||||
self.assertTrue(lines[0].endswith('OK'))
|
||||
self.assertTrue(lines[1].startswith('*** Summary'))
|
||||
|
||||
def test_call_linter_with_deleted_migrations(self):
|
||||
cmd = '{0} {1} 154ecf6119325cc3b1f3f5a4e709bfbd61a4a4ba'.format(
|
||||
self.linter_exec,
|
||||
fixtures.DELETED_MIGRATION_PROJECT)
|
||||
|
||||
Reference in new issue
Block a user