Author: mtredinnick
Date: 2011-08-25 02:23:49 -0700 (Thu, 25 Aug 2011)
New Revision: 16686
Modified:
django/trunk/tests/modeltests/invalid_models/invalid_models/models.py
Log:
Fix test from r16678 and r16681 properly for Oracle.
Fixes #16694, with thanks to aagustin for the Oracle testing and
tweaking.
Modified: django/trunk/tests/modeltests/invalid_models/invalid_models/models.py
===================================================================
--- django/trunk/tests/modeltests/invalid_models/invalid_models/models.py
2011-08-25 09:20:44 UTC (rev 16685)
+++ django/trunk/tests/modeltests/invalid_models/invalid_models/models.py
2011-08-25 09:23:49 UTC (rev 16686)
@@ -5,7 +5,7 @@
This example exists purely to point out errors in models.
"""
-from django.db import models
+from django.db import connection, models
class FieldErrors(models.Model):
charfield = models.CharField()
@@ -342,5 +342,8 @@
invalid_models.nonexistingorderingwithsingleunderscore: "ordering" refers to
"does_not_exist", a field that doesn't exist.
invalid_models.invalidsetnull: 'fk' specifies on_delete=SET_NULL, but cannot
be null.
invalid_models.invalidsetdefault: 'fk' specifies on_delete=SET_DEFAULT, but
has no default value.
-invalid_models.primarykeynull: "my_pk_field": Primary key fields cannot have
null=True.
"""
+
+if not connection.features.interprets_empty_strings_as_nulls:
+ model_errors += """invalid_models.primarykeynull: "my_pk_field": Primary
key fields cannot have null=True.
+"""
--
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.