mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-04-29 14:44:42 +00:00
Test case demonstrating relation failure.
https://github.com/carljm/django-model-utils/issues/120
This commit is contained in:
parent
f1e3a18c5f
commit
a49936c267
1 changed files with 6 additions and 0 deletions
|
|
@ -1238,12 +1238,18 @@ class PassThroughManagerTests(TestCase):
|
|||
class CreatePassThroughManagerTests(TestCase):
|
||||
def setUp(self):
|
||||
self.dude = Dude.objects.create(name='El Duderino')
|
||||
self.other_dude = Dude.objects.create(name='Das D\xc3de')
|
||||
|
||||
def test_reverse_manager(self):
|
||||
Spot.objects.create(
|
||||
name='The Crib', owner=self.dude, closed=True, secure=True,
|
||||
secret=False)
|
||||
self.assertEqual(self.dude.spots_owned.closed().count(), 1)
|
||||
Spot.objects.create(
|
||||
name='The Crux', owner=self.other_dude, closed=True, secure=True,
|
||||
secret=False
|
||||
)
|
||||
self.assertEqual(self.dude.spots_owned.closed().count(), 1)
|
||||
|
||||
def test_related_queryset_pickling(self):
|
||||
Spot.objects.create(
|
||||
|
|
|
|||
Loading…
Reference in a new issue