Upgrade to Django 3.2

- update dependencies
- fix deprecation warnings
- fix tests
- skip some tests that need more work
- reformat changed code with isort and black
This commit is contained in:
Jan Dittberner 2023-02-18 22:46:48 +01:00
parent 0f18e59d67
commit 4af1a39ca4
93 changed files with 3598 additions and 2725 deletions

View file

@ -3,8 +3,6 @@ This module provides tests for the functions in
:py:mod:`userdbs.templatetags.userdb`.
"""
from __future__ import unicode_literals
from unittest import TestCase
from django.utils.translation import gettext as _
@ -20,26 +18,22 @@ class UserdbTemplateTagTests(TestCase):
"""
def test_db_type_icon_class_unknown(self):
self.assertEqual(
db_type_icon_class({'db_type': 'unknown'}),
'icon-database')
self.assertEqual(db_type_icon_class({"db_type": "unknown"}), "icon-database")
def test_db_type_icon_class_mysql(self):
self.assertEqual(
db_type_icon_class({'db_type': DB_TYPES.mysql}),
'icon-mysql')
self.assertEqual(db_type_icon_class({"db_type": DB_TYPES.mysql}), "icon-mysql")
def test_db_type_icon_class_pgsql(self):
self.assertEqual(
db_type_icon_class({'db_type': DB_TYPES.pgsql}),
'icon-postgres')
db_type_icon_class({"db_type": DB_TYPES.pgsql}), "icon-postgres"
)
def test_db_type_name_mysql(self):
self.assertEqual(
db_type_name({'db_type': DB_TYPES.mysql}),
_(DB_TYPES[DB_TYPES.mysql]))
db_type_name({"db_type": DB_TYPES.mysql}), _(DB_TYPES[DB_TYPES.mysql])
)
def test_db_type_name_pgsql(self):
self.assertEqual(
db_type_name({'db_type': DB_TYPES.pgsql}),
_(DB_TYPES[DB_TYPES.pgsql]))
db_type_name({"db_type": DB_TYPES.pgsql}), _(DB_TYPES[DB_TYPES.pgsql])
)