changeset 5394:0b9aadc314de

tests: fix failing test_ip_restriction_git with some git versions
author Søren Løvborg <sorenl@unity3d.com>
date Thu, 13 Aug 2015 15:29:59 +0200
parents 8c38b8a5a1ac
children 74d5ae62bf74
files kallithea/tests/other/manual_test_vcs_operations.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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():