Fixed a bunch more tests that were failing in Oracle due to false assumptions about the primary keys of objects.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15789 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ian Kelly 2011-03-09 23:46:28 +00:00
parent 23103bddb9
commit f17fc56602
12 changed files with 149 additions and 135 deletions

View file

@ -116,8 +116,8 @@ class ForeignKeyTests(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):