# HG changeset patch # User Søren Løvborg # Date 1439472599 -7200 # Node ID 0b9aadc314de5d41969d7dc6d5da25d55a3eefce # Parent 8c38b8a5a1ac67d52f4ba95777f006df6a3fff87 tests: fix failing test_ip_restriction_git with some git versions diff -r 8c38b8a5a1ac -r 0b9aadc314de kallithea/tests/other/manual_test_vcs_operations.py --- a/kallithea/tests/other/manual_test_vcs_operations.py Mon Aug 17 01:11:42 2015 +0200 +++ b/kallithea/tests/other/manual_test_vcs_operations.py Thu Aug 13 15:29:59 2015 +0200 @@ -32,6 +32,7 @@ """ +import re import tempfile import time from os.path import join as jn @@ -520,8 +521,8 @@ Session().commit() clone_url = _construct_url(GIT_REPO) stdout, stderr = Command('/tmp').execute('git clone', clone_url) - msg = ("""The requested URL returned error: 403""") - assert msg in stderr + # The message apparently changed in Git 1.8.3, so match it loosely. + assert re.search(r'\b403\b', stderr) finally: #release IP restrictions for ip in UserIpMap.getAll():