Do not check if .git folder exists
git commands will fail anyway if not present
This commit is contained in:
1 parent
99534e4eb9
commit
574af4b7fe
3 files changed
+3
-28
No files matched your search
@@ -16,25 +16,11 @@ import os
|
||||
import unittest
|
||||
|
||||
from tests import fixtures
|
||||
from django_migration_linter.utils import is_django_project, is_git_project, is_directory, find_project_settings_module, \
|
||||
from django_migration_linter.utils import is_django_project, is_directory, find_project_settings_module, \
|
||||
split_path, split_migration_path
|
||||
|
||||
|
||||
class UtilityFunctionTest(unittest.TestCase):
|
||||
def tearDown(self, *args, **kwargs):
|
||||
fixtures.clear_all_git_projects()
|
||||
super(
|
||||
UtilityFunctionTest,
|
||||
self).tearDown(*args, **kwargs)
|
||||
|
||||
def test_detect_not_git_project(self):
|
||||
self.assertFalse(is_git_project(fixtures.NOT_GIT_DJANGO_PROJECT))
|
||||
|
||||
def test_detect_git_project(self):
|
||||
project_path = fixtures.MULTI_COMMIT_PROJECT
|
||||
fixtures.prepare_git_project(project_path)
|
||||
self.assertTrue(is_git_project(project_path))
|
||||
|
||||
def test_detect_django_project(self):
|
||||
self.assertTrue(is_django_project(fixtures.ADD_NOT_NULL_COLUMN_PROJECT))
|
||||
|
||||
|
||||
Reference in new issue
Block a user