mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-03-16 22:10:31 +00:00
chore: Add test-case for #760
This commit is contained in:
parent
7125db9f68
commit
880e37e7cd
1 changed files with 21 additions and 0 deletions
21
modeltranslation/tests/test_compat.py
Normal file
21
modeltranslation/tests/test_compat.py
Normal file
|
|
@ -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
|
||||
Loading…
Reference in a new issue