mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-14 10:51:21 +01:00
Merge pull request #634 from auto-mat/fix-tests
Fix tests in develop branch
This commit is contained in:
commit
a08408fcb1
@ -77,3 +77,12 @@ def create_ticket(**kwargs):
|
|||||||
|
|
||||||
|
|
||||||
HELPDESK_URLCONF = 'helpdesk.urls'
|
HELPDESK_URLCONF = 'helpdesk.urls'
|
||||||
|
|
||||||
|
|
||||||
|
def print_response(response, stdout=False):
|
||||||
|
content = response.content.decode()
|
||||||
|
if stdout:
|
||||||
|
print(content)
|
||||||
|
else:
|
||||||
|
with open("response.html", "w") as f: # pragma: no cover
|
||||||
|
f.write(content) # pragma: no cover
|
||||||
|
@ -60,8 +60,7 @@ class QuickDjangoTest(object):
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
SITE_ID = 1
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
self.apps = args
|
self.apps = args
|
||||||
@ -85,7 +84,9 @@ 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/',
|
||||||
TEMPLATES=self.TEMPLATES
|
LOGIN_URL='/helpdesk/login/',
|
||||||
|
TEMPLATES=self.TEMPLATES,
|
||||||
|
SITE_ID=1
|
||||||
)
|
)
|
||||||
|
|
||||||
from django.test.runner import DiscoverRunner
|
from django.test.runner import DiscoverRunner
|
||||||
|
Loading…
Reference in New Issue
Block a user