Skip to content

Commit

Permalink
Removed obsolete code (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulocheque authored Sep 5, 2023
1 parent 591a7ef commit bfe2daf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
4 changes: 2 additions & 2 deletions django_dynamic_fixture/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
__version__ = '4.0.0'


if not django_greater_than(1, 10):
warnings.warn("DDF officially supports only Django 1.11 or higher.", DeprecationWarning)
if not django_greater_than(4, 0):
warnings.warn("DDF 4.* officially supports only Django 4 or higher.", DeprecationWarning)


LOOKUP_SEP = '__'
Expand Down
7 changes: 1 addition & 6 deletions django_dynamic_fixture/global_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
import warnings

from django.conf import settings
try:
# Django 2.0
from django.urls import get_mod_func
except ImportError:
# Django <= 1.11
from django.core.urlresolvers import get_mod_func
from django.urls import get_mod_func
try:
from importlib import import_module
except ImportError:
Expand Down
4 changes: 0 additions & 4 deletions django_dynamic_fixture/tests/test_ddf.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,6 @@ def test_new_create_with_min_depth_2(self):


class NewDealWithInheritanceTest(DDFTestCase):
@pytest.mark.skipif(django.VERSION > (3, 2), reason="Not supported on Django 3.2+")
def test_new_must_not_raise_an_error_if_model_is_abstract(self):
self.ddf.new(ModelAbstract) # it does not raise an exceptions

def test_get_must_raise_an_error_if_model_is_abstract(self):
with pytest.raises(InvalidModelError):
self.ddf.get(ModelAbstract)
Expand Down

0 comments on commit bfe2daf

Please sign in to comment.