mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Applied ignore_warnings to Django tests
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import warnings
|
||||
|
||||
from django.db import models
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
@@ -55,9 +54,7 @@ class Base(models.Model):
|
||||
class Article(models.Model):
|
||||
name = models.CharField(max_length=50)
|
||||
text = models.TextField()
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
warnings.simplefilter("always")
|
||||
submitted_from = models.IPAddressField(blank=True, null=True)
|
||||
submitted_from = models.GenericIPAddressField(blank=True, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return "Article %s" % self.name
|
||||
|
||||
Reference in New Issue
Block a user