Changeset - 460cfae11203
[Not reviewed]
default
0 1 0
Mads Kiilerich - 6 years ago 2019-06-07 01:25:27
mads@kiilerich.com
tests: fix merge error in test_vcs_operations mixins for Mercurial and Git - don't hardcode webserver repo_url_param
1 file changed with 3 insertions and 6 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/other/test_vcs_operations.py
Show inline comments
 
@@ -52,25 +52,22 @@ fixture = Fixture()
 
# Parameterize different kinds of VCS testing - both the kind of VCS and the
 
# access method (HTTP/SSH)
 

	
 
# Mixin for using HTTP URLs
 
class HttpVcsTest(object):
 
    @staticmethod
 
    def repo_url_param(webserver, repo_name, **kwargs):
 
        return webserver.repo_url(repo_name, **kwargs)
 

	
 
# Mixins for using Mercurial and Git
 
class HgVcsTest(object):
 
    repo_type = 'hg'
 
    repo_name = HG_REPO
 
    @staticmethod
 
    def repo_url_param(webserver, repo_name, **kwargs):
 
        return webserver.repo_url(repo_name, **kwargs)
 

	
 
class GitVcsTest(object):
 
    repo_type = 'git'
 
    repo_name = GIT_REPO
 
    @staticmethod
 
    def repo_url_param(webserver, repo_name, **kwargs):
 
        return webserver.repo_url(repo_name, **kwargs)
 

	
 
# Combine mixins to give the combinations we want to parameterize tests with
 
class HgHttpVcsTest(HgVcsTest, HttpVcsTest):
 
    pass
 

	
0 comments (0 inline, 0 general)