diff --git a/tests/aaaaaa/__init__.py b/tests/aaaaaa/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/aaaaaa/models.py b/tests/aaaaaa/models.py
new file mode 100644
index 0000000..e96855d
-
|
+
|
|
| 1 | from django.db import models |
| 2 | |
| 3 | class ModelManager(models.Manager): |
| 4 | def get_queryset(self): |
| 5 | return super(ModelManager, self).get_queryset().filter(parent__isnull=False) |
| 6 | |
| 7 | class Category(models.Model): |
| 8 | parent = models.ForeignKey('Category', to_field='slug', blank=True, null=True, on_delete=models.SET_NULL) |
| 9 | slug = models.SlugField() |
| 10 | |
| 11 | vehicle_models = ModelManager() |
diff --git a/tests/aaaaaa/tests.py b/tests/aaaaaa/tests.py
new file mode 100644
index 0000000..d51edff
-
|
+
|
|
| 1 | from django.test import TestCase |
| 2 | |
| 3 | from .models import Category |
| 4 | |
| 5 | |
| 6 | class ReproTestCase(TestCase): |
| 7 | def test_repro(self): |
| 8 | qs = Category.vehicle_models.all() |
| 9 | self.assertIn('IS NOT NULL', str(qs.query)) |