incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [1/3] git commit: [#6619] update all the tests using :80
Date Tue, 03 Sep 2013 21:02:59 GMT
Updated Branches:
  refs/heads/master 7a51d42e7 -> 8b15df901


[#6619] update all the tests using :80


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

Branch: refs/heads/master
Commit: 8b15df9016a6a63154b2bcc338a81c337dbea0d8
Parents: f1253f6
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Thu Aug 29 19:31:14 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Sep 3 21:01:57 2013 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_rest.py               |  2 +-
 Allura/allura/tests/test_globals.py                       |  4 ++--
 ForgeBlog/forgeblog/tests/functional/test_rest.py         |  2 +-
 .../forgediscussion/tests/functional/test_forum_admin.py  |  4 ++--
 .../forgediscussion/tests/functional/test_rest.py         | 10 +++++-----
 ForgeGit/forgegit/tests/functional/test_controllers.py    |  8 ++++----
 ForgeSVN/forgesvn/tests/functional/test_controllers.py    |  8 ++++----
 ForgeTracker/forgetracker/tests/functional/test_root.py   | 10 +++++-----
 ForgeWiki/forgewiki/tests/functional/test_rest.py         |  4 ++--
 9 files changed, 26 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8b15df90/Allura/allura/tests/functional/test_rest.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_rest.py b/Allura/allura/tests/functional/test_rest.py
index 0977f26..8bb3a28 100644
--- a/Allura/allura/tests/functional/test_rest.py
+++ b/Allura/allura/tests/functional/test_rest.py
@@ -80,7 +80,7 @@ class TestRestHome(TestRestApiBase):
         admin_dev = r.json['developers'][0]
         assert_equal(admin_dev['username'], 'test-admin')
         assert_equal(admin_dev['name'], 'Test Admin')
-        assert_equal(admin_dev['url'], 'http://localhost:80/u/test-admin/')
+        assert_equal(admin_dev['url'], 'http://localhost/u/test-admin/')
 
     @td.with_tool('test', 'Tickets', 'bugs')
     @td.with_tool('test', 'Tickets', 'private-bugs')

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8b15df90/Allura/allura/tests/test_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index 437021b..3ce26bb 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -54,8 +54,8 @@ def test_app_globals():
     g.oid_session()
     with h.push_context('test', 'wiki', neighborhood='Projects'):
         assert g.app_static('css/wiki.css') == '/nf/_static_/wiki/css/wiki.css', g.app_static('css/wiki.css')
-        assert g.url('/foo', a='foo bar') == 'http://localhost:80/foo?a=foo+bar', g.url('/foo',
a='foo bar')
-        assert g.url('/foo') == 'http://localhost:80/foo', g.url('/foo')
+        assert g.url('/foo', a='foo bar') == 'http://localhost/foo?a=foo+bar', g.url('/foo',
a='foo bar')
+        assert g.url('/foo') == 'http://localhost/foo', g.url('/foo')
 
 
 @with_setup(teardown=setUp) # reset everything we changed

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8b15df90/ForgeBlog/forgeblog/tests/functional/test_rest.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/tests/functional/test_rest.py b/ForgeBlog/forgeblog/tests/functional/test_rest.py
index f545c7e..b1b3bc7 100644
--- a/ForgeBlog/forgeblog/tests/functional/test_rest.py
+++ b/ForgeBlog/forgeblog/tests/functional/test_rest.py
@@ -44,7 +44,7 @@ class TestBlogApi(TestRestApiBase):
             'labels': 'label1, label2'
         }
         r = self.api_post('/rest/p/test/blog/', **data)
-        assert_equal(r.location, 'http://localhost:80/rest/p/test/blog/%s/%s/test/' % (date.today().strftime("%Y"),
date.today().strftime("%m")))
+        assert_equal(r.location, 'http://localhost/rest/p/test/blog/%s/%s/test/' % (date.today().strftime("%Y"),
date.today().strftime("%m")))
         assert_equal(r.status_int, 201)
         url = '/rest' + BM.BlogPost.query.find().first().url()
         r = self.api_get('/rest/p/test/blog/')

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8b15df90/ForgeDiscussion/forgediscussion/tests/functional/test_forum_admin.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/tests/functional/test_forum_admin.py b/ForgeDiscussion/forgediscussion/tests/functional/test_forum_admin.py
index cb85182..8a92969 100644
--- a/ForgeDiscussion/forgediscussion/tests/functional/test_forum_admin.py
+++ b/ForgeDiscussion/forgediscussion/tests/functional/test_forum_admin.py
@@ -288,5 +288,5 @@ class TestForumAdmin(TestController):
         r = self.app.post('/discussion/save_new_topic', params=params)
         M.MonQTask.run_ready()
         email_tasks = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendsimplemail')).all()
-        assert 'Sent from sourceforge.net because email@monitoring.com is subscribed to http://localhost:80/p/test/discussion/testforum/'
in email_tasks[0].kwargs['text'],email_tasks[0].kwargs['text']
-        assert 'a project admin can change settings at http://localhost:80/p/test/admin/discussion/forums'
in email_tasks[0].kwargs['text']
+        assert 'Sent from sourceforge.net because email@monitoring.com is subscribed to http://localhost/p/test/discussion/testforum/'
in email_tasks[0].kwargs['text'],email_tasks[0].kwargs['text']
+        assert 'a project admin can change settings at http://localhost/p/test/admin/discussion/forums'
in email_tasks[0].kwargs['text']

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8b15df90/ForgeDiscussion/forgediscussion/tests/functional/test_rest.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/tests/functional/test_rest.py b/ForgeDiscussion/forgediscussion/tests/functional/test_rest.py
index afdcdc5..d9f0c39 100644
--- a/ForgeDiscussion/forgediscussion/tests/functional/test_rest.py
+++ b/ForgeDiscussion/forgediscussion/tests/functional/test_rest.py
@@ -71,14 +71,14 @@ class TestRootRestController(TestDiscussionApiBase):
         assert_equal(forums[0]['name'], 'General Discussion')
         assert_equal(forums[0]['description'], 'Forum about anything you want to talk about.')
         assert_equal(forums[0]['num_topics'], 2)
-        assert_equal(forums[0]['url'], 'http://localhost:80/rest/p/test/discussion/general/')
+        assert_equal(forums[0]['url'], 'http://localhost/rest/p/test/discussion/general/')
         assert_equal(forums[0]['last_post']['subject'], 'Hi guys')
         assert_equal(forums[0]['last_post']['author'], 'test-admin')
         assert_equal(forums[0]['last_post']['text'], 'Hi boys and girls')
         assert_equal(forums[1]['name'], u'Say Héllo')
         assert_equal(forums[1]['description'], u'Say héllo here')
         assert_equal(forums[1]['num_topics'], 0)
-        assert_equal(forums[1]['url'], 'http://localhost:80/rest/p/test/discussion/h%C3%A9llo/')
+        assert_equal(forums[1]['url'], 'http://localhost/rest/p/test/discussion/h%C3%A9llo/')
         assert_equal(forums[1]['last_post'], None)
 
     def test_forum(self):
@@ -94,7 +94,7 @@ class TestRootRestController(TestDiscussionApiBase):
         assert_equal(topics[0]['last_post']['author'], 'test-admin')
         assert_equal(topics[0]['last_post']['text'], 'Hi boys and girls')
         t = ForumThread.query.find({'subject': 'Hi guys'}).first()
-        url = 'http://localhost:80/rest/p/test/discussion/general/thread/%s/' % t._id
+        url = 'http://localhost/rest/p/test/discussion/general/thread/%s/' % t._id
         assert_equal(topics[0]['url'], url)
         assert_equal(topics[1]['subject'], 'Let\'s talk')
         assert_equal(topics[1]['num_views'], 0)
@@ -102,7 +102,7 @@ class TestRootRestController(TestDiscussionApiBase):
         assert_equal(topics[1]['last_post']['author'], 'test-admin')
         assert_equal(topics[1]['last_post']['text'], '1st post')
         t = ForumThread.query.find({'subject': 'Let\'s talk'}).first()
-        url = 'http://localhost:80/rest/p/test/discussion/general/thread/%s/' % t._id
+        url = 'http://localhost/rest/p/test/discussion/general/thread/%s/' % t._id
         assert_equal(topics[1]['url'], url)
 
     def test_forum_show_ok_topics(self):
@@ -128,7 +128,7 @@ class TestRootRestController(TestDiscussionApiBase):
         assert_equal(forum['name'], 'General Discussion')
         assert_equal(forum['description'], 'Forum about anything you want to talk about.')
         topics = forum['topics']
-        topic = self.api_get(topics[0]['url'][len('http://localhost:80'):])
+        topic = self.api_get(topics[0]['url'][len('http://localhost'):])
         topic = topic.json['topic']
         assert_equal(len(topic['posts']), 1)
         assert_equal(topic['subject'], 'Hi guys')

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8b15df90/ForgeGit/forgegit/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index 638fd90..919e97b 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -176,10 +176,10 @@ class TestRootController(_TestCase):
             description = channel.find('description').text
             assert_equal(description, 'Recent changes to Git repository in test project')
             link = channel.find('link').text
-            assert_equal(link, 'http://localhost:80/p/test/src-git/')
+            assert_equal(link, 'http://localhost/p/test/src-git/')
             commit = channel.find('item')
             assert_equal(commit.find('title').text, 'Initial commit')
-            link = 'http://localhost:80/p/test/src-git/ci/9a7df788cf800241e3bb5a849c8870f2f8259d98/'
+            link = 'http://localhost/p/test/src-git/ci/9a7df788cf800241e3bb5a849c8870f2f8259d98/'
             assert_equal(commit.find('link').text, link)
             assert_equal(commit.find('guid').text, link)
         # .atom has slightly different structure
@@ -188,10 +188,10 @@ class TestRootController(_TestCase):
         title = r.xml.find(prefix + 'title').text
         assert_equal(title, 'test Git changes')
         link = r.xml.find(prefix + 'link').attrib['href']
-        assert_equal(link, 'http://localhost:80/p/test/src-git/')
+        assert_equal(link, 'http://localhost/p/test/src-git/')
         commit = r.xml.find(prefix + 'entry')
         assert_equal(commit.find(prefix + 'title').text, 'Initial commit')
-        link = 'http://localhost:80/p/test/src-git/ci/9a7df788cf800241e3bb5a849c8870f2f8259d98/'
+        link = 'http://localhost/p/test/src-git/ci/9a7df788cf800241e3bb5a849c8870f2f8259d98/'
         assert_equal(commit.find(prefix + 'link').attrib['href'], link)
 
     def test_tree(self):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8b15df90/ForgeSVN/forgesvn/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/functional/test_controllers.py b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
index eb7d409..ae8c86d 100644
--- a/ForgeSVN/forgesvn/tests/functional/test_controllers.py
+++ b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
@@ -109,10 +109,10 @@ class TestRootController(SVNTestController):
             description = channel.find('description').text
             assert_equal(description, 'Recent changes to SVN repository in test project')
             link = channel.find('link').text
-            assert_equal(link, 'http://localhost:80/p/test/src/')
+            assert_equal(link, 'http://localhost/p/test/src/')
             commit = channel.find('item')
             assert_equal(commit.find('title').text, 'Create readme')
-            link = 'http://localhost:80/p/test/src/1/'
+            link = 'http://localhost/p/test/src/1/'
             assert_equal(commit.find('link').text, link)
             assert_equal(commit.find('guid').text, link)
         # .atom has slightly different structure
@@ -121,10 +121,10 @@ class TestRootController(SVNTestController):
         title = r.xml.find(prefix + 'title').text
         assert_equal(title, 'test SVN changes')
         link = r.xml.find(prefix + 'link').attrib['href']
-        assert_equal(link, 'http://localhost:80/p/test/src/')
+        assert_equal(link, 'http://localhost/p/test/src/')
         commit = r.xml.find(prefix + 'entry')
         assert_equal(commit.find(prefix + 'title').text, 'Create readme')
-        link = 'http://localhost:80/p/test/src/1/'
+        link = 'http://localhost/p/test/src/1/'
         assert_equal(commit.find(prefix + 'link').attrib['href'], link)
 
     def test_commit(self):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8b15df90/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index a78abd9..0ba4f0b 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -1877,10 +1877,10 @@ class TestFunctionalController(TrackerTestController):
         discussion_url = r.html.findAll('form')[-1]['action'][:-4]
         r = self.app.get('/rest/p/test/bugs/1/')
         r = json.loads(r.body)
-        assert_equal(r['ticket']['discussion_thread_url'],'http://localhost:80/rest%s' %
discussion_url)
+        assert_equal(r['ticket']['discussion_thread_url'],'http://localhost/rest%s' % discussion_url)
         slug = r['ticket']['discussion_thread']['posts'][0]['slug']
         assert_equal(r['ticket']['discussion_thread']['posts'][0]['attachments'][0]['url'],
-                     'http://localhost:80%s%s/attachment/test.txt' % (discussion_url, slug))
+                     'http://localhost%s%s/attachment/test.txt' % (discussion_url, slug))
         assert_equal(r['ticket']['discussion_thread']['posts'][0]['attachments'][0]['bytes'],
11)
 
         file_name = 'test_root.py'
@@ -1891,7 +1891,7 @@ class TestFunctionalController(TrackerTestController):
         }, upload_files=[upload]).follow()
         r = self.app.get('/rest/p/test/bugs/1/')
         r = json.loads(r.body)
-        assert_equal(r['ticket']['attachments'][0]['url'], 'http://localhost:80/p/test/bugs/1/attachment/test_root.py')
+        assert_equal(r['ticket']['attachments'][0]['url'], 'http://localhost/p/test/bugs/1/attachment/test_root.py')
 
     def test_html_escaping(self):
         with mock.patch.object(mail_tasks.smtp_client, '_client') as _client:
@@ -2138,8 +2138,8 @@ class TestEmailMonitoring(TrackerTestController):
         ThreadLocalORMSession.flush_all()
         M.MonQTask.run_ready()
         email_tasks = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendsimplemail')).all()
-        assert 'Sent from sourceforge.net because mailinglist@example.com is subscribed to
http://localhost:80/p/test/bugs/' in email_tasks[0].kwargs['text']
-        assert 'a project admin can change settings at http://localhost:80/p/test/admin/bugs/options'
in email_tasks[0].kwargs['text']
+        assert 'Sent from sourceforge.net because mailinglist@example.com is subscribed to
http://localhost/p/test/bugs/' in email_tasks[0].kwargs['text']
+        assert 'a project admin can change settings at http://localhost/p/test/admin/bugs/options'
in email_tasks[0].kwargs['text']
 
 class TestCustomUserField(TrackerTestController):
     def setUp(self):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8b15df90/ForgeWiki/forgewiki/tests/functional/test_rest.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/tests/functional/test_rest.py b/ForgeWiki/forgewiki/tests/functional/test_rest.py
index 0b93680..2b5cfd5 100644
--- a/ForgeWiki/forgewiki/tests/functional/test_rest.py
+++ b/ForgeWiki/forgewiki/tests/functional/test_rest.py
@@ -45,8 +45,8 @@ class TestWikiApi(TestRestApiBase):
         self.app.post('/wiki/Home/attach', upload_files=[('file_info', 'test_root.py', content)])
         r = self.app.get('/rest/p/test/wiki/Home/')
         r = json.loads(r.body)
-        assert_equal(r['attachments'][0]['url'], 'http://localhost:80/p/test/wiki/Home/attachment/test_root.py')
-        assert_equal(r['discussion_thread_url'], 'http://localhost:80/rest%s' % discussion_url)
+        assert_equal(r['attachments'][0]['url'], 'http://localhost/p/test/wiki/Home/attachment/test_root.py')
+        assert_equal(r['discussion_thread_url'], 'http://localhost/rest%s' % discussion_url)
         assert_equal(r['discussion_thread']['_id'], discussion_url.split('/')[-2])
         self.app.post('/wiki/Home/attach', upload_files=[('file_info', '__init__.py', content),])
         r = self.app.get('/rest/p/test/wiki/Home/')


Mime
View raw message