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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user