You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/06/08 01:42:49 UTC

[4/4] git commit: [#6276] Test fixes for new base_url in test.ini

[#6276] Test fixes for new base_url in test.ini

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/22dc0feb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/22dc0feb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/22dc0feb

Branch: refs/heads/master
Commit: 22dc0febef6aa7659e0ab4a416f3cda53faf8c16
Parents: 49c2bb1
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Fri Jun 7 23:41:02 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Fri Jun 7 23:42:13 2013 +0000

----------------------------------------------------------------------
 ForgeGit/forgegit/tests/model/test_repository.py |    4 ++--
 ForgeSVN/forgesvn/tests/model/test_repository.py |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/22dc0feb/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index 021e2f8..9509fb2 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -187,7 +187,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
         assert os.path.exists(os.path.join(g.tmpdir, 'testgit.git/hooks/post-receive'))
         assert os.stat(os.path.join(g.tmpdir, 'testgit.git/hooks/post-receive'))[0] & stat.S_IXUSR
         with open(os.path.join(g.tmpdir, 'testgit.git/hooks/post-receive')) as f: c = f.read()
-        self.assertIn('curl -s http://localhost//auth/refresh_repo/p/test/src-git/\n', c)
+        self.assertIn('curl -s http://localhost/auth/refresh_repo/p/test/src-git/\n', c)
         self.assertIn('exec $DIR/post-receive-user\n', c)
         shutil.rmtree(dirname)
 
@@ -216,7 +216,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
             assert os.path.exists(os.path.join(g.tmpdir, 'testgit.git/hooks/post-receive'))
             assert os.stat(os.path.join(g.tmpdir, 'testgit.git/hooks/post-receive'))[0] & stat.S_IXUSR
             with open(os.path.join(g.tmpdir, 'testgit.git/hooks/post-receive')) as f: c = f.read()
-            self.assertIn('curl -s http://localhost//auth/refresh_repo/p/test/src-git/\n', c)
+            self.assertIn('curl -s http://localhost/auth/refresh_repo/p/test/src-git/\n', c)
             self.assertIn('exec $DIR/post-receive-user\n', c)
             shutil.rmtree(dirname)
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/22dc0feb/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index 9751b38..ddc6c75 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -165,7 +165,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
         assert os.access(os.path.join(g.tmpdir, 'testsvn/hooks/post-commit'), os.X_OK)
         with open(os.path.join(g.tmpdir, 'testsvn/hooks/post-commit')) as f:
             c = f.read()
-        self.assertIn('curl -s http://localhost//auth/refresh_repo/p/test/src/\n', c)
+        self.assertIn('curl -s http://localhost/auth/refresh_repo/p/test/src/\n', c)
         self.assertIn('exec $DIR/post-commit-user "$@"\n', c)
 
         repo.refresh(notify=False)
@@ -212,7 +212,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
         assert os.access(os.path.join(g.tmpdir, 'testsvn/hooks/post-commit'), os.X_OK)
         with open(os.path.join(g.tmpdir, 'testsvn/hooks/post-commit')) as f:
             c = f.read()
-        self.assertIn('curl -s http://localhost//auth/refresh_repo/p/test/src/\n', c)
+        self.assertIn('curl -s http://localhost/auth/refresh_repo/p/test/src/\n', c)
         self.assertIn('exec $DIR/post-commit-user "$@"\n', c)
 
         repo.refresh(notify=False)
@@ -538,7 +538,7 @@ class TestSVNRev(unittest.TestCase):
         n = M.Notification.query.find(
             dict(subject='[test:src] [r1] - rick446: Create readme')).first()
         assert n
-        assert_equal(n.text, 'Create readme http://localhost//p/test/src/1/')
+        assert_equal(n.text, 'Create readme http://localhost/p/test/src/1/')
 
 
 class _Test(unittest.TestCase):
@@ -725,7 +725,7 @@ class TestRepo(_TestWithRepo):
         self.repo._impl.refresh_commit_info = refresh_commit_info
         _id = lambda oid: getattr(oid, '_id', str(oid))
         self.repo.shorthand_for_commit = lambda oid: '[' + _id(oid) + ']'
-        self.repo.url_for_commit = lambda oid: 'ci/' + _id(oid) + '/'
+        self.repo.url_for_commit = lambda oid: '/ci/' + _id(oid) + '/'
         self.repo.refresh()
         ThreadLocalORMSession.flush_all()
         notifications = M.Notification.query.find().all()