1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

[py3k] Silence many warnings while running the tests.

This commit is contained in:
Alex Gaynor
2012-09-07 13:17:09 -04:00
parent 4321ee25c5
commit 292322f977
29 changed files with 213 additions and 196 deletions

View File

@@ -3,6 +3,7 @@ from __future__ import unicode_literals
from django.core.exceptions import ValidationError
from django.db import models
from django.utils import six
from django.utils.unittest import TestCase
@@ -18,7 +19,7 @@ class ValidationMessagesTest(TestCase):
self._test_validation_messages(f, 'fõo',
["'fõo' value must be an integer."])
# primary_key must be True. Refs #12467.
with self.assertRaisesRegexp(AssertionError,
with six.assertRaisesRegex(self, AssertionError,
"AutoFields must have primary_key=True."):
models.AutoField(primary_key=False)