tests: fixed all tests for python3 BIG changes
This commit is contained in:
parent
1627525cb1
commit
bf561e5914
208 changed files with 2545 additions and 2063 deletions
|
|
@ -39,7 +39,7 @@ class TestModDavSvnConfig(object):
|
|||
def get_repo_group_mocks(cls, count=1):
|
||||
repo_groups = []
|
||||
for num in range(0, count):
|
||||
full_path = u'/path/to/RepöGröúp-°µ {}'.format(num)
|
||||
full_path = f'/path/to/RepöGröúp-°µ {num}'
|
||||
repo_group_mock = mock.MagicMock()
|
||||
repo_group_mock.full_path = full_path
|
||||
repo_group_mock.full_path_splitted = full_path.split('/')
|
||||
|
|
@ -78,7 +78,7 @@ class TestModDavSvnConfig(object):
|
|||
def test_render_mod_dav_svn_config_with_alternative_template(self, tmpdir):
|
||||
repo_groups = self.get_repo_group_mocks(count=10)
|
||||
test_file_path = os.path.join(str(tmpdir), 'example.mako')
|
||||
with open(test_file_path, 'wb') as f:
|
||||
with open(test_file_path, 'wt') as f:
|
||||
f.write('TEST_EXAMPLE\n')
|
||||
|
||||
generated_config = utils._render_mod_dav_svn_config(
|
||||
|
|
@ -107,11 +107,11 @@ class TestModDavSvnConfig(object):
|
|||
|
||||
# Assert that correct configuration directive is present.
|
||||
if list_parent_path:
|
||||
assert not re.search('SVNListParentPath\s+Off', generated_config)
|
||||
assert re.search('SVNListParentPath\s+On', generated_config)
|
||||
assert not re.search(r'SVNListParentPath\s+Off', generated_config)
|
||||
assert re.search(r'SVNListParentPath\s+On', generated_config)
|
||||
else:
|
||||
assert re.search('SVNListParentPath\s+Off', generated_config)
|
||||
assert not re.search('SVNListParentPath\s+On', generated_config)
|
||||
assert re.search(r'SVNListParentPath\s+Off', generated_config)
|
||||
assert not re.search(r'SVNListParentPath\s+On', generated_config)
|
||||
|
||||
if use_ssl:
|
||||
assert 'RequestHeader edit Destination ^https: http: early' \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue