Commit f75d88d1 authored by Michal Čihař's avatar Michal Čihař

Simplify class inheritance

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent d9deb783
......@@ -58,14 +58,21 @@ class MultiRepoTest(ViewTestCase):
'''
Tests handling of remote changes, conflicts and so on.
'''
def setUp(self):
def setUp(self, vcs='git'):
super(MultiRepoTest, self).setUp()
if vcs == 'git':
repo = self.git_repo_path
push = self.git_repo_path
else:
repo = self.hg_repo_path
push = self.hg_repo_path
self.subproject2 = SubProject.objects.create(
name='Test 2',
slug='test-2',
project=self.project,
repo=self.git_repo_path,
push=self.git_repo_path,
repo=repo,
push=push,
vcs=vcs,
filemask='po/*.po',
template='',
file_format='po',
......@@ -226,21 +233,7 @@ class MultiRepoTest(ViewTestCase):
class MercurialMultiRepoTest(MultiRepoTest):
def setUp(self):
super(MultiRepoTest, self).setUp()
self.subproject2 = SubProject.objects.create(
name='Test 2',
slug='test-2',
project=self.project,
repo=self.hg_repo_path,
push=self.hg_repo_path,
filemask='po/*.po',
template='',
file_format='po',
vcs='mercurial',
repoweb=REPOWEB_URL,
new_base='',
)
self.request = self.get_request('/')
super(MercurialMultiRepoTest, self).setUp(vcs='mercurial')
def create_subproject(self):
return self.create_po_mercurial()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment