changeset 7733:460cfae11203

tests: fix merge error in test_vcs_operations mixins for Mercurial and Git - don't hardcode webserver repo_url_param
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 07 Jun 2019 01:25:27 +0200
parents 1f831a8a590c
children afa5e0bdb76f
files kallithea/tests/other/test_vcs_operations.py
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/tests/other/test_vcs_operations.py	Thu Jun 06 23:47:43 2019 +0200
+++ b/kallithea/tests/other/test_vcs_operations.py	Fri Jun 07 01:25:27 2019 +0200
@@ -52,25 +52,22 @@
 # 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