summaryrefslogtreecommitdiff
path: root/tests/field_deconstruction
diff options
context:
space:
mode:
authorAnssi Kääriäinen <anssi.kaariainen@thl.fi>2015-02-26 16:19:17 +0200
committerTim Graham <timograham@gmail.com>2015-03-25 08:16:12 -0400
commit8f30556329b64005d63b66859a74752a0b261315 (patch)
tree73b5ac8d3be457f8061aa270437c9a957d2d622c /tests/field_deconstruction
parentf9c70bb3a1239ed1e04a769fd323286a5b1fde20 (diff)
Renamed Field.rel attribute to remote_field
Field.rel is now deprecated. Rel objects have now also remote_field attribute. This means that self == self.remote_field.remote_field. In addition, made the Rel objects a bit more like Field objects. Still, marked ManyToManyFields as null=True.
Diffstat (limited to 'tests/field_deconstruction')
-rw-r--r--tests/field_deconstruction/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/field_deconstruction/tests.py b/tests/field_deconstruction/tests.py
index bbbbefa7e9..30c5e89213 100644
--- a/tests/field_deconstruction/tests.py
+++ b/tests/field_deconstruction/tests.py
@@ -178,8 +178,8 @@ class FieldDeconstructionTests(TestCase):
# Test basic pointing
from django.contrib.auth.models import Permission
field = models.ForeignKey("auth.Permission")
- field.rel.to = Permission
- field.rel.field_name = "id"
+ field.remote_field.model = Permission
+ field.remote_field.field_name = "id"
name, path, args, kwargs = field.deconstruct()
self.assertEqual(path, "django.db.models.ForeignKey")
self.assertEqual(args, [])