Removed a test that didn't make sense; code could never be called the way the test was written.

This commit is contained in:
Alex Gaynor 2013-05-09 06:55:25 -07:00
parent 3d595c3bc3
commit 6634cb7b53
1 changed files with 0 additions and 4 deletions

View File

@ -60,10 +60,6 @@ class ManyToOneRegressionTests(TestCase):
self.assertRaises(ValueError, Child, name='xyzzy', parent=None) self.assertRaises(ValueError, Child, name='xyzzy', parent=None)
self.assertRaises(ValueError, Child.objects.create, name='xyzzy', parent=None) self.assertRaises(ValueError, Child.objects.create, name='xyzzy', parent=None)
# Trying to assign to unbound attribute raises AttributeError
six.assertRaisesRegex(self, AttributeError, "must be accessed via instance",
Child.parent.__set__, None, p)
# Creation using keyword argument should cache the related object. # Creation using keyword argument should cache the related object.
p = Parent.objects.get(name="Parent") p = Parent.objects.get(name="Parent")
c = Child(parent=p) c = Child(parent=p)