4 from cola
.models
.main
import MainModel
6 class MainModelTestCase(helper
.TestCase
):
7 """Tests the cola.models.main.MainModel class."""
9 def setup_baseline_repo(self
, commit
=True):
10 """Create a baseline repo for testing."""
12 git init >/dev/null &&
17 self
.shell("git commit -s -m'Initial commit' >/dev/null")
19 def test_project(self
):
20 """Test the MainModel's 'project' attribute."""
21 self
.setup_baseline_repo()
23 model
.use_worktree(os
.getcwd())
24 project
= os
.path
.basename(self
.get_dir())
25 self
.assertEqual(project
, model
.project
)