Commit 06d61547 authored by Ayush Tiwari's avatar Ayush Tiwari

Clean up test

parent 47fbd181
......@@ -127,10 +127,10 @@ class GitCloneNonInformativeTests(unittest.TestCase):
def test_ignore_ssl_certificate_false(self):
self.test_ignore_ssl_certificate(ignore_ssl_certificate=False)
def test_clone_submodules_by_default(self, ignore_submodules=False):
def test_clone_submodules_by_default(self, clone_submodules=True):
recipe = self.makeGitCloneRecipe(
{'repository': GIT_REPOSITORY_WITH_SUBMODULES,
'clone_submodules': str(ignore_submodules).lower()}
'clone-submodules': str(clone_submodules).lower()}
)
recipe.install()
git_repository_path = os.path.join(self.parts_directory_path, "test")
......@@ -139,13 +139,13 @@ class GitCloneNonInformativeTests(unittest.TestCase):
# Check if the folder exists
self.assertTrue(os.path.exists(git_repository_path))
# Check is there is anything in submodule repository path
if not ignore_submodules:
if clone_submodules:
self.assertTrue(os.listdir(submodule_repo_path))
else:
self.assertFalse(os.listdir(submodule_repo_path))
def test_ignore_cloning_submodules(self):
self.test_clone_submodules_by_default(ignore_submodules=True)
self.test_clone_submodules_by_default(clone_submodules=False)
def test_suite():
suite = unittest.TestSuite((
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment