Skip to content

Commit

Permalink
fix: do not define django_app_config
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVZ96 committed Oct 26, 2023
1 parent ccc7ab6 commit 814319b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions completion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Completion App
"""

__version__ = '4.4.0'
import django

default_app_config = 'completion.apps.CompletionAppConfig' # pylint: disable=invalid-name
__version__ = '4.4.0'
15 changes: 15 additions & 0 deletions completion/tests/test_compatibility.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
Test compatibility with multiple django versions.
"""
from django.test import TestCase

import completion


class TestDefaultAppConfig(TestCase):
"""
Test that default_app_config is only defined if Django version is <3.2
"""

def test_not_defined(self):
self.assertFalse(hasattr(completion, "default_app_config"))

0 comments on commit 814319b

Please sign in to comment.