Fix DeprecationWarning about default_app_config in Django 3.2
This commit is contained in:
parent
1209c2cc68
commit
2c1236106d
3 changed files with 11 additions and 6 deletions
|
@ -16,6 +16,7 @@ Added
|
|||
Fixes
|
||||
-----
|
||||
* Fix unicode sandwich issue in cas_server.utils.update_url
|
||||
* Fix DeprecationWarning about default_app_config in Django 3.2
|
||||
|
||||
Removed
|
||||
-------
|
||||
|
|
|
@ -9,9 +9,11 @@
|
|||
#
|
||||
# (c) 2015-2016 Valentin Samir
|
||||
"""A django CAS server application"""
|
||||
import django
|
||||
|
||||
#: version of the application
|
||||
VERSION = '1.3.1'
|
||||
|
||||
#: path the the application configuration class
|
||||
default_app_config = 'cas_server.apps.CasAppConfig'
|
||||
if django.VERSION < (3, 2):
|
||||
#: path the the application configuration class
|
||||
default_app_config = 'cas_server.apps.CasAppConfig'
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#
|
||||
# (c) 2016 Valentin Samir
|
||||
"""Tests module for utils"""
|
||||
import django
|
||||
from django.test import TestCase, RequestFactory
|
||||
from django.db import connection
|
||||
|
||||
|
@ -173,10 +174,11 @@ class UtilsTestCase(TestCase):
|
|||
utils.import_attr('cas_server.utils.toto')
|
||||
with self.assertRaises(ValueError):
|
||||
utils.import_attr('toto')
|
||||
self.assertEqual(
|
||||
utils.import_attr('cas_server.default_app_config'),
|
||||
'cas_server.apps.CasAppConfig'
|
||||
)
|
||||
if django.VERSION < (3, 2):
|
||||
self.assertEqual(
|
||||
utils.import_attr('cas_server.default_app_config'),
|
||||
'cas_server.apps.CasAppConfig'
|
||||
)
|
||||
self.assertEqual(utils.import_attr(utils), utils)
|
||||
|
||||
def test_update_url(self):
|
||||
|
|
Loading…
Reference in a new issue