Beispiel #1
0
    def test_init_success(self):
        dir_name = mkdtemp()

        try:
            init(dir_name)

            with open(path.join(dir_name, 'Castorfile')) as f:
                self.assertTrue(validate_castorfile(f))

            with open(path.join(dir_name, '.gitignore')) as f:
                self.assertEqual('/lodge\n', f.read())

            repo = git.Repo(dir_name)
            self.assertFalse(repo.bare)
            self.assertFalse(repo.is_dirty())
            self.assertEqual(repo.untracked_files, [])

        finally:
            rmtree(dir_name)
Beispiel #2
0
 def test_validate_1(self):
     with open(path.join(ASSETS_ROOT, 'test1', 'Castorfile')) as f:
         self.assertTrue(validate_castorfile(f))