Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix test from r16678 and r16681 properly for Oracle.

Fixes #16694, with thanks to aagustin for the Oracle testing and
tweaking.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16686 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit bb99fe46b7915ef131ba54e8348c9a1d52bd6ddd 1 parent b0764e8
Malcolm Tredinnick authored August 25, 2011
7  tests/modeltests/invalid_models/invalid_models/models.py
@@ -5,7 +5,7 @@
5 5
 This example exists purely to point out errors in models.
6 6
 """
7 7
 
8  
-from django.db import models
  8
+from django.db import connection, models
9 9
 
10 10
 class FieldErrors(models.Model):
11 11
     charfield = models.CharField()
@@ -342,5 +342,8 @@ class PrimaryKeyNull(models.Model):
342 342
 invalid_models.nonexistingorderingwithsingleunderscore: "ordering" refers to "does_not_exist", a field that doesn't exist.
343 343
 invalid_models.invalidsetnull: 'fk' specifies on_delete=SET_NULL, but cannot be null.
344 344
 invalid_models.invalidsetdefault: 'fk' specifies on_delete=SET_DEFAULT, but has no default value.
345  
-invalid_models.primarykeynull: "my_pk_field": Primary key fields cannot have null=True.
  345
+"""
  346
+
  347
+if not connection.features.interprets_empty_strings_as_nulls:
  348
+    model_errors += """invalid_models.primarykeynull: "my_pk_field": Primary key fields cannot have null=True.
346 349
 """

0 notes on commit bb99fe4

Please sign in to comment.
Something went wrong with that request. Please try again.