Created
August 31, 2023 15:32
-
-
Save maddrum/a86854f7c3d4eec2517ae2163d5cd601 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.test import TestCase | |
from path.to.abstract.model import SomeAbstractModel | |
class SampleModel(SomeAbstractModel): | |
class Meta: | |
# app_label is needed in cases where tests are in folder of project to be able to find this model | |
app_label = 'app.name.of.where.abstract.model.is.defined' | |
class TestSomeAbstractModel(TestCase): | |
def test_something(self): | |
mod, created = SampleModel.objects.create() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment