From 437d5b81c443e1bcedb777336b5d2e25915eb54b Mon Sep 17 00:00:00 2001 From: Martin Whitehouse Date: Mon, 20 Jun 2022 17:26:52 +0200 Subject: [PATCH] Fix failing tests --- helpdesk/tests/test_ticket_actions.py | 4 ++-- helpdesk/urls.py | 4 ++-- quicktest.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helpdesk/tests/test_ticket_actions.py b/helpdesk/tests/test_ticket_actions.py index a729425b..b08b3aa9 100644 --- a/helpdesk/tests/test_ticket_actions.py +++ b/helpdesk/tests/test_ticket_actions.py @@ -197,10 +197,10 @@ class TicketActionsTestCase(TestCase): # generate the URL text result = num_to_link('this is ticket#%s' % ticket_id) - self.assertEqual(result, "this is ticket #%s" % (ticket_id, ticket_id)) + self.assertEqual(result, "this is ticket #%s" % (ticket_id, ticket_id)) result2 = num_to_link('whoa another ticket is here #%s huh' % ticket_id) - self.assertEqual(result2, "whoa another ticket is here #%s huh" % (ticket_id, ticket_id)) + self.assertEqual(result2, "whoa another ticket is here #%s huh" % (ticket_id, ticket_id)) def test_create_ticket_getform(self): self.loginUser() diff --git a/helpdesk/urls.py b/helpdesk/urls.py index 7e5792e7..aaa53d92 100644 --- a/helpdesk/urls.py +++ b/helpdesk/urls.py @@ -144,8 +144,8 @@ urlpatterns += [ ] urlpatterns += [ - path( - "rss/user//", + re_path( + r"^rss/user/(?P[a-zA-Z0-9\.]+)/", helpdesk_staff_member_required(feeds.OpenTicketsByUser()), name="rss_user", ), diff --git a/quicktest.py b/quicktest.py index 3837abd8..42a98445 100644 --- a/quicktest.py +++ b/quicktest.py @@ -98,7 +98,7 @@ class QuickDjangoTest(object): MIDDLEWARE=self.MIDDLEWARE, ROOT_URLCONF='helpdesk.tests.urls', STATIC_URL='/static/', - LOGIN_URL='/helpdesk/login/', + LOGIN_URL='/login/', TEMPLATES=self.TEMPLATES, SITE_ID=1, SECRET_KEY='wowdonotusethisfakesecuritykeyyouneedarealsecure1',