Testing quicktest.py

This commit is contained in:
Garret Wassermann 2018-01-11 02:19:49 -05:00
parent 31b49ab2f6
commit 75f54dd233
4 changed files with 7 additions and 5 deletions

View File

@ -13,7 +13,7 @@ project_root = os.path.dirname(here)
NAME = 'django-helpdesk-demodesk'
DESCRIPTION = 'A demo Django project using django-helpdesk'
README = open(os.path.join(here, 'README.rst')).read()
VERSION = '0.2.6'
VERSION = '0.3.0.dev1'
#VERSION = open(os.path.join(project_root, 'VERSION')).read().strip()
AUTHOR = 'django-helpdesk team'
URL = 'https://github.com/django-helpdesk/django-helpdesk'

View File

@ -1131,7 +1131,10 @@ class UserSettings(models.Model):
from helpdesk.lib import b64decode
try:
if six.PY3:
return pickle.loads(b64decode(bytes(self.settings_pickled, 'utf8')))
if type(self.settings_pickled) is bytes:
return pickle.loads(b64decode(str(self.settings_pickled, 'utf8')))
else:
return pickle.loads(b64decode(bytes(self.settings_pickled, 'utf8')))
else:
return pickle.loads(b64decode(str(self.settings_pickled)))
except pickle.UnpicklingError:

View File

@ -5,8 +5,7 @@ from django.urls import reverse
from django.test import TestCase
from helpdesk import settings as helpdesk_settings
from helpdesk.tests.helpers import (get_staff_user, reload_urlconf, User, update_user_settings, delete_user_settings,
create_ticket)
from helpdesk.tests.helpers import (get_staff_user, reload_urlconf, User, update_user_settings, delete_user_settings, create_ticket)
class KBDisabledTestCase(TestCase):

View File

@ -28,7 +28,7 @@ class QuickDjangoTest(object):
'django.contrib.sites',
'django.contrib.staticfiles',
'markdown_deux',
'bootstrapform',
'bootstrapform'
)
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',