diff options
| author | Ian Kelly <ian.g.kelly@gmail.com> | 2011-03-10 00:04:43 +0000 |
|---|---|---|
| committer | Ian Kelly <ian.g.kelly@gmail.com> | 2011-03-10 00:04:43 +0000 |
| commit | ec7dd583f2b33aa9a575530fbec215426348fdf6 (patch) | |
| tree | ff98d0dcfa506719d905d2a408663b5390673830 /tests/regressiontests/model_fields/tests.py | |
| parent | 317f30a77f744281137cde87ca59855761c8e86e (diff) | |
[1.2.X] Fixed a bunch more tests that were failing in Oracle due to false assumptions about the primary keys of objects.
Backport of r15789 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15790 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/model_fields/tests.py')
| -rw-r--r-- | tests/regressiontests/model_fields/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/regressiontests/model_fields/tests.py b/tests/regressiontests/model_fields/tests.py index 6835913f12..f4bc63be7c 100644 --- a/tests/regressiontests/model_fields/tests.py +++ b/tests/regressiontests/model_fields/tests.py @@ -115,8 +115,8 @@ class ForeignKeyTests(django.test.TestCase): bar_b = Bar.objects.create(b='bla', a=b) form = BazForm() fk_field = str(form['foo']) - self.assertEqual(len(re.findall(r'value="2"', fk_field)), 0) - self.assertEqual(len(re.findall(r'value="1"', fk_field)), 1) + self.assertEqual(len(re.findall(r'value="%d"' % b.pk, fk_field)), 0) + self.assertEqual(len(re.findall(r'value="%d"' % a.pk, fk_field)), 1) class DateTimeFieldTests(unittest.TestCase): def test_datetimefield_to_python_usecs(self): |
