summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2008-08-29 16:32:44 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2008-08-29 16:32:44 +0000
commitddf7d7ab0257c6a6dc9ea141cba4b437431a85d1 (patch)
treeaba84039a5881940e0304134d42e0eae6b7c55ba
parent8cfecbd748f4b1ed6e3663ec0cc5bb37339439ae (diff)
Fixed #8668: prevent MySQL from running the new test from [8676].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/regressiontests/serializers_regress/tests.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/regressiontests/serializers_regress/tests.py b/tests/regressiontests/serializers_regress/tests.py
index 6430c5b38d..c6167b12e7 100644
--- a/tests/regressiontests/serializers_regress/tests.py
+++ b/tests/regressiontests/serializers_regress/tests.py
@@ -260,11 +260,7 @@ The end."""),
(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 @@ if settings.DATABASE_ENGINE == 'oracle':
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):