|
@@ -1,4 +1,5 @@
|
|
|
import json
|
|
|
+import warnings
|
|
|
|
|
|
from django.core import mail
|
|
|
from django.contrib.auth.models import User
|
|
@@ -234,6 +235,13 @@ class TestForms(TestCase):
|
|
|
class TestDataImport(TestCase):
|
|
|
fixtures = ['bottle_data.yaml']
|
|
|
|
|
|
+ @classmethod
|
|
|
+ def setUpClass(cls, *args, **kwargs):
|
|
|
+ # Silence the warnings about naive datetimes contained in the yaml.
|
|
|
+ with warnings.catch_warnings(): # Scope warn catch to this block
|
|
|
+ warnings.simplefilter('ignore', RuntimeWarning)
|
|
|
+ return super().setUpClass(*args, **kwargs)
|
|
|
+
|
|
|
def test_re_save(self):
|
|
|
for contrib in Contrib.objects.all():
|
|
|
contrib.full_clean()
|