Fix failing tests

This commit is contained in:
Martin Whitehouse 2022-06-20 17:26:52 +02:00
parent 93bb43bf1d
commit 437d5b81c4
No known key found for this signature in database
GPG Key ID: 8492A7A45769CD35
3 changed files with 5 additions and 5 deletions

View File

@ -197,10 +197,10 @@ class TicketActionsTestCase(TestCase):
# generate the URL text # generate the URL text
result = num_to_link('this is ticket#%s' % ticket_id) result = num_to_link('this is ticket#%s' % ticket_id)
self.assertEqual(result, "this is ticket <a href='/helpdesk/tickets/%s/' class='ticket_link_status ticket_link_status_Open'>#%s</a>" % (ticket_id, ticket_id)) self.assertEqual(result, "this is ticket <a href='/tickets/%s/' class='ticket_link_status ticket_link_status_Open'>#%s</a>" % (ticket_id, ticket_id))
result2 = num_to_link('whoa another ticket is here #%s huh' % ticket_id) result2 = num_to_link('whoa another ticket is here #%s huh' % ticket_id)
self.assertEqual(result2, "whoa another ticket is here <a href='/helpdesk/tickets/%s/' class='ticket_link_status ticket_link_status_Open'>#%s</a> huh" % (ticket_id, ticket_id)) self.assertEqual(result2, "whoa another ticket is here <a href='/tickets/%s/' class='ticket_link_status ticket_link_status_Open'>#%s</a> huh" % (ticket_id, ticket_id))
def test_create_ticket_getform(self): def test_create_ticket_getform(self):
self.loginUser() self.loginUser()

View File

@ -144,8 +144,8 @@ urlpatterns += [
] ]
urlpatterns += [ urlpatterns += [
path( re_path(
"rss/user/<str:user_name>/", r"^rss/user/(?P<user_name>[a-zA-Z0-9\.]+)/",
helpdesk_staff_member_required(feeds.OpenTicketsByUser()), helpdesk_staff_member_required(feeds.OpenTicketsByUser()),
name="rss_user", name="rss_user",
), ),

View File

@ -98,7 +98,7 @@ class QuickDjangoTest(object):
MIDDLEWARE=self.MIDDLEWARE, MIDDLEWARE=self.MIDDLEWARE,
ROOT_URLCONF='helpdesk.tests.urls', ROOT_URLCONF='helpdesk.tests.urls',
STATIC_URL='/static/', STATIC_URL='/static/',
LOGIN_URL='/helpdesk/login/', LOGIN_URL='/login/',
TEMPLATES=self.TEMPLATES, TEMPLATES=self.TEMPLATES,
SITE_ID=1, SITE_ID=1,
SECRET_KEY='wowdonotusethisfakesecuritykeyyouneedarealsecure1', SECRET_KEY='wowdonotusethisfakesecuritykeyyouneedarealsecure1',