diff --git a/tests/bug23940/__init__.py b/tests/bug23940/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/bug23940/models.py b/tests/bug23940/models.py
new file mode 100644
index 0000000..644a613
-
|
+
|
|
| 1 | from django.db import models |
| 2 | |
| 3 | class Foo(models.Model): |
| 4 | # Changing the name of this field to anything else makes the test pass |
| 5 | exact = models.BooleanField(default=False) |
| 6 | |
| 7 | |
| 8 | class Bar(models.Model): |
| 9 | foo = models.ForeignKey('Foo') |
diff --git a/tests/bug23940/tests.py b/tests/bug23940/tests.py
new file mode 100644
index 0000000..8efe68a
-
|
+
|
|
| 1 | from django.test import TestCase |
| 2 | |
| 3 | from .models import Foo, Bar |
| 4 | |
| 5 | class FooTestCase(TestCase): |
| 6 | def test_foo(self): |
| 7 | f = Foo.objects.create() |
| 8 | b = Bar.objects.create(foo=f) |
| 9 | self.assertEqual(f.bar_set.count(), 1) |