mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-26 16:48:50 +01:00
chaging tests to aknowledge helpdesk namespace
This commit is contained in:
parent
f5ecb67b22
commit
a741395ce5
@ -539,7 +539,7 @@ class Ticket(models.Model):
|
||||
return '%s %s' % (self.id, self.title)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return ('helpdesk_view', (self.id,))
|
||||
return ('helpdesk:view', (self.id,))
|
||||
get_absolute_url = models.permalink(get_absolute_url)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
@ -928,7 +928,7 @@ class KBCategory(models.Model):
|
||||
verbose_name_plural = _('Knowledge base categories')
|
||||
|
||||
def get_absolute_url(self):
|
||||
return ('helpdesk_kb_category', (), {'slug': self.slug})
|
||||
return ('kb_category', (), {'slug': self.slug})
|
||||
get_absolute_url = models.permalink(get_absolute_url)
|
||||
|
||||
|
||||
@ -996,7 +996,7 @@ class KBItem(models.Model):
|
||||
verbose_name_plural = _('Knowledge base items')
|
||||
|
||||
def get_absolute_url(self):
|
||||
return ('helpdesk_kb_item', (self.id,))
|
||||
return ('helpdesk:kb_item', (self.id,))
|
||||
get_absolute_url = models.permalink(get_absolute_url)
|
||||
|
||||
|
||||
|
@ -26,11 +26,11 @@ class TestKBDisabled(TestCase):
|
||||
from django.core.urlresolvers import NoReverseMatch
|
||||
|
||||
self.client.login(username=get_staff_user().get_username(), password='password')
|
||||
self.assertRaises(NoReverseMatch, reverse, 'helpdesk_kb_index')
|
||||
self.assertRaises(NoReverseMatch, reverse, 'helpdesk:kb_index')
|
||||
try:
|
||||
response = self.client.get(reverse('helpdesk:dashboard'))
|
||||
except NoReverseMatch as e:
|
||||
if 'helpdesk_kb_index' in e.message:
|
||||
if 'helpdesk:kb_index' in e.message:
|
||||
self.fail("Please verify any unchecked references to helpdesk_kb_index (start with navigation.html)")
|
||||
else:
|
||||
raise
|
||||
|
5
helpdesk/tests/urls.py
Normal file
5
helpdesk/tests/urls.py
Normal file
@ -0,0 +1,5 @@
|
||||
from django.conf.urls import include, url
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^helpdesk/', include('helpdesk.urls', namespace='helpdesk')),
|
||||
]
|
@ -90,7 +90,7 @@ class QuickDjangoTest(object):
|
||||
},
|
||||
INSTALLED_APPS = self.INSTALLED_APPS + self.apps,
|
||||
MIDDLEWARE_CLASSES = self.MIDDLEWARE_CLASSES,
|
||||
ROOT_URLCONF = self.apps[0] + '.urls',
|
||||
ROOT_URLCONF = 'tests.urls',
|
||||
STATIC_URL = '/static/'
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user