You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by di...@apache.org on 2023/03/20 16:01:39 UTC
[allura] branch master updated: fix failing trac wiki tests that were previously unused and apparently wrong
This is an automated email from the ASF dual-hosted git repository.
dill0wn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new 9b5ad5420 fix failing trac wiki tests that were previously unused and apparently wrong
9b5ad5420 is described below
commit 9b5ad5420f5b676d1d74ef6bdd0d76edbc13b194
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Mon Mar 20 15:58:00 2023 +0000
fix failing trac wiki tests that were previously unused and apparently wrong
---
.../forgeimporters/trac/tests/test_tickets.py | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/ForgeImporters/forgeimporters/trac/tests/test_tickets.py b/ForgeImporters/forgeimporters/trac/tests/test_tickets.py
index 6d0915e0c..ccc04c5d3 100644
--- a/ForgeImporters/forgeimporters/trac/tests/test_tickets.py
+++ b/ForgeImporters/forgeimporters/trac/tests/test_tickets.py
@@ -21,7 +21,7 @@ import os
from unittest import TestCase, skipIf
from mock import Mock, patch
from ming.odm import ThreadLocalODMSession
-from tg import tmpl_context as c
+from tg import tmpl_context as c, config
from allura.tests import TestController
from allura.tests.decorators import with_tracker, with_wiki
@@ -187,12 +187,10 @@ class TestTracTicketImportController(TestController, TestCase):
@patch('forgeimporters.base.import_tool')
def test_url_ticket_import_fail(self, import_tool, head):
head.return_value.status_code = 200
- params = dict(trac_url='https://sf-1.xb.sf.net/trac/url',
- mount_label='mylabel',
- mount_point='mymount',
- )
- r = self.app.post('/p/test/admin/ext/import/trac-tickets-sf/create', params,
- status=200)
+ params = dict(trac_url=f'{config["base_url"]}/trac/url',
+ mount_label='mylabel',
+ mount_point='mymount')
+ r = self.app.post('/p/test/admin/ext/import/trac-tickets/create', params, status=200)
self.assertIn('Invalid URL', r.text)
@with_wiki
@@ -200,12 +198,10 @@ class TestTracTicketImportController(TestController, TestCase):
@patch('forgeimporters.base.import_tool')
def test_url_wiki_import_fail(self, import_tool, head):
head.return_value.status_code = 200
- params = dict(trac_url='https://sf-1.xb.sf.net/trac/url',
- mount_label='mylabel',
- mount_point='mymount',
- )
- r = self.app.post('/p/test/admin/ext/import/trac-wiki/create', params,
- status=200)
+ params = dict(trac_url=f'{config["base_url"]}/trac/url',
+ mount_label='mylabel',
+ mount_point='mymount')
+ r = self.app.post('/p/test/admin/ext/import/trac-wiki/create', params, status=200)
self.assertIn('Invalid URL', r.text)