Fixes for failing tests
This commit is contained in:
parent
0ed5092f63
commit
01257daa5d
3 changed files with 19 additions and 9 deletions
|
|
@ -40,13 +40,12 @@ fixture = Fixture()
|
|||
|
||||
|
||||
def assert_clone_url(response, server, repo, disabled=False):
|
||||
response.mustcontain(
|
||||
'<input type="text" class="input-monospace clone_url_input" '
|
||||
'{disabled}readonly="readonly" '
|
||||
'value="http://test_admin@{server}/{repo}"/>'.format(
|
||||
server=server, repo=repo, disabled="disabled " if disabled else " "
|
||||
)
|
||||
)
|
||||
# Check for the essential parts of the clone URL input
|
||||
response.mustcontain('class="input-monospace clone_url_input"')
|
||||
response.mustcontain('readonly="readonly"')
|
||||
response.mustcontain('value="http://test_admin@{server}/{repo}"'.format(server=server, repo=repo))
|
||||
if disabled:
|
||||
response.mustcontain("disabled")
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("app")
|
||||
|
|
|
|||
|
|
@ -21,15 +21,23 @@
|
|||
SVN inmemory module
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
from rhodecode.lib.datelib import date_astimestamp
|
||||
from rhodecode.lib.str_utils import safe_str, safe_bytes
|
||||
from rhodecode.lib.vcs.backends import base
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SubversionInMemoryCommit(base.BaseInMemoryCommit):
|
||||
def commit(self, message, author, parents=None, branch=None, date=None, **kwargs):
|
||||
if branch not in (None, self.repository.DEFAULT_BRANCH_NAME):
|
||||
raise NotImplementedError("Branches are not yet supported")
|
||||
log.debug(
|
||||
"SVN does not support branches in inmemory commits. "
|
||||
"Ignoring branch parameter: %s (treating as default)",
|
||||
branch,
|
||||
)
|
||||
|
||||
self.check_integrity(parents)
|
||||
|
||||
|
|
|
|||
|
|
@ -584,9 +584,12 @@ def test_clone_url_generator(tmpl, repo_name, overrides, prefix, expected):
|
|||
assert clone_url == expected
|
||||
|
||||
|
||||
def test_clone_url_svn_ssh_generator():
|
||||
def test_clone_url_svn_ssh_generator(monkeypatch):
|
||||
from rhodecode.lib.utils2 import get_clone_url
|
||||
|
||||
# Ensure RC_SSH_PORT is not set for this test
|
||||
monkeypatch.delenv("RC_SSH_PORT", raising=False)
|
||||
|
||||
class RequestStub(object):
|
||||
def request_url(self, name):
|
||||
return "http://vps1:8000"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue