Skip to content

Commit

Permalink
chore: Add test-case for #760
Browse files Browse the repository at this point in the history
  • Loading branch information
last-partizan committed Sep 28, 2024
1 parent 7125db9 commit 880e37e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions modeltranslation/tests/test_compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# mypy: disable-error-code="import-not-found"
import pytest
from modeltranslation import translator


class TestDjangoModelUtils:
"""
Test case for https://github.com/deschler/django-modeltranslation/issues/760
"""
def test_soft_deletable_model(self):
try:
from model_utils.models import SoftDeletableModel
except ImportError:
pytest.skip("django-model-utils not installed")

class M1(SoftDeletableModel):
pass

@translator.register(M1)
class M1Options(translator.TranslationOptions):
pass

0 comments on commit 880e37e

Please sign in to comment.