Changeset - 33427561b389
[Not reviewed]
stable
0 1 0
Mads Kiilerich - 6 years ago 2020-04-30 13:49:02
mads@kiilerich.com
tests: avoid test dependency in test_repo_groups.py
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/models/test_repo_groups.py
Show inline comments
 
@@ -54,25 +54,25 @@ class TestRepoGroups(base.TestController
 
        return os.path.isdir(path)
 

	
 
    def __delete_group(self, id_):
 
        RepoGroupModel().delete(id_)
 

	
 
    def test_create_group(self):
 
        g = fixture.create_repo_group('newGroup')
 
        Session().commit()
 
        assert g.full_path == 'newGroup'
 

	
 
        assert self.__check_path('newGroup')
 

	
 
    def test_create_same_name_group(self):
 
        # test_create_same_name_group
 
        with pytest.raises(IntegrityError):
 
            fixture.create_repo_group('newGroup')
 
        Session().rollback()
 

	
 
    def test_same_subgroup(self):
 
        sg1 = fixture.create_repo_group('sub1', parent_group_id=self.g1.group_id)
 
        assert sg1.parent_group == self.g1
 
        assert sg1.full_path == 'test1/sub1'
 
        assert self.__check_path('test1', 'sub1')
 

	
 
        ssg1 = fixture.create_repo_group('subsub1', parent_group_id=sg1.group_id)
 
        assert ssg1.parent_group == sg1
0 comments (0 inline, 0 general)