From 01820466ca1e2425c6a5535402b36251c5e5dae5 Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Sat, 11 May 2013 22:41:34 +0200 Subject: [PATCH] Don't hardcode primary keys in gis tests. --- django/contrib/gis/tests/geoapp/test_regress.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/contrib/gis/tests/geoapp/test_regress.py b/django/contrib/gis/tests/geoapp/test_regress.py index d6f3c8d698..f8f2e0de3a 100644 --- a/django/contrib/gis/tests/geoapp/test_regress.py +++ b/django/contrib/gis/tests/geoapp/test_regress.py @@ -77,8 +77,8 @@ class GeoRegressionTests(TestCase): t1 = Truth.objects.create(val=True) t2 = Truth.objects.create(val=False) - val1 = Truth.objects.get(pk=1).val - val2 = Truth.objects.get(pk=2).val + val1 = Truth.objects.get(pk=t1).val + val2 = Truth.objects.get(pk=t2).val # verify types -- should't be 0/1 self.assertIsInstance(val1, bool) self.assertIsInstance(val2, bool)