Author: jacob
Date: 2008-08-29 11:32:44 -0500 (Fri, 29 Aug 2008)
New Revision: 8703
Modified:
django/trunk/tests/regressiontests/serializers_regress/tests.py
Log:
Fixed #8668: prevent MySQL from running the new test from [8676].
Modified: django/trunk/tests/regressiontests/serializers_regress/tests.py
===================================================================
--- django/trunk/tests/regressiontests/serializers_regress/tests.py
2008-08-29 16:31:00 UTC (rev 8702)
+++ django/trunk/tests/regressiontests/serializers_regress/tests.py
2008-08-29 16:32:44 UTC (rev 8703)
@@ -260,11 +260,7 @@
(fk_obj, 452, FKDataToField, None),
(fk_obj, 460, FKDataToO2O, 300),
-
- # Regression test for #8651 -- FK = 0
- (data_obj, 0, Anchor, "Anchor 0"),
- (fk_obj, 465, FKData, 0),
-
+
(im2m_obj, 470, M2MIntermediateData, None),
#testing post- and prereferences and extra fields
@@ -336,6 +332,15 @@
data[2]._meta.get_field('data').empty_strings_allowed
and
data[3] is None)]
+# Regression test for #8651 -- a FK to an object iwth PK of 0
+# This won't work on MySQL since it won't let you create an object
+# with a primary key of 0,
+if settings.DATABASE_ENGINE != 'mysql':
+ test_data.extend([
+ (data_obj, 0, Anchor, "Anchor 0"),
+ (fk_obj, 465, FKData, 0),
+ ])
+
# Dynamically create serializer tests to ensure that all
# registered serializers are automatically tested.
class SerializerTests(unittest.TestCase):
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---