Skip to content

Commit

Permalink
Fix test from r16678 and r16681 properly for Oracle.
Browse files Browse the repository at this point in the history
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
malcolmt committed Aug 25, 2011
1 parent b0764e8 commit bb99fe4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/modeltests/invalid_models/invalid_models/models.py
Expand Up @@ -5,7 +5,7 @@
This example exists purely to point out errors in models. 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): class FieldErrors(models.Model):
charfield = models.CharField() charfield = models.CharField()
Expand Down Expand Up @@ -342,5 +342,8 @@ class PrimaryKeyNull(models.Model):
invalid_models.nonexistingorderingwithsingleunderscore: "ordering" refers to "does_not_exist", a field that doesn't exist. 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.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.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.
""" """

0 comments on commit bb99fe4

Please sign in to comment.