diff options
| author | Simon Charette <charette.s@gmail.com> | 2015-04-17 17:38:20 -0400 |
|---|---|---|
| committer | Simon Charette <charette.s@gmail.com> | 2015-05-20 13:46:13 -0400 |
| commit | be67400b477c1b0e7e81766f41bbceed0de74bdc (patch) | |
| tree | fd8e6d087082754df9159a5549bfa80e2a8c57d9 /tests/model_fields | |
| parent | e2b77aceddbda9071fcfc38f90fb50d091d0b5fc (diff) | |
Refs #24652 -- Used SimpleTestCase where appropriate.
Diffstat (limited to 'tests/model_fields')
| -rw-r--r-- | tests/model_fields/test_durationfield.py | 8 | ||||
| -rw-r--r-- | tests/model_fields/test_field_flags.py | 2 | ||||
| -rw-r--r-- | tests/model_fields/test_uuid.py | 8 | ||||
| -rw-r--r-- | tests/model_fields/tests.py | 8 |
4 files changed, 13 insertions, 13 deletions
diff --git a/tests/model_fields/test_durationfield.py b/tests/model_fields/test_durationfield.py index fece35d57b..fb26baadc9 100644 --- a/tests/model_fields/test_durationfield.py +++ b/tests/model_fields/test_durationfield.py @@ -4,7 +4,7 @@ import json from django import forms from django.core import exceptions, serializers from django.db import models -from django.test import TestCase +from django.test import SimpleTestCase, TestCase from .models import DurationModel, NullDurationModel @@ -46,7 +46,7 @@ class TestQuerying(TestCase): ) -class TestSerialization(TestCase): +class TestSerialization(SimpleTestCase): test_data = '[{"fields": {"field": "1 01:00:00"}, "model": "model_fields.durationmodel", "pk": null}]' def test_dumping(self): @@ -59,7 +59,7 @@ class TestSerialization(TestCase): self.assertEqual(instance.field, datetime.timedelta(days=1, hours=1)) -class TestValidation(TestCase): +class TestValidation(SimpleTestCase): def test_invalid_string(self): field = models.DurationField() @@ -73,7 +73,7 @@ class TestValidation(TestCase): ) -class TestFormField(TestCase): +class TestFormField(SimpleTestCase): # Tests for forms.DurationField are in the forms_tests app. def test_formfield(self): diff --git a/tests/model_fields/test_field_flags.py b/tests/model_fields/test_field_flags.py index 6e609e6794..84227d4192 100644 --- a/tests/model_fields/test_field_flags.py +++ b/tests/model_fields/test_field_flags.py @@ -72,7 +72,7 @@ FLAG_PROPERTIES_FOR_RELATIONS = ( ) -class FieldFlagsTests(test.TestCase): +class FieldFlagsTests(test.SimpleTestCase): @classmethod def setUpClass(cls): super(FieldFlagsTests, cls).setUpClass() diff --git a/tests/model_fields/test_uuid.py b/tests/model_fields/test_uuid.py index 21c2869edf..e72a6bce56 100644 --- a/tests/model_fields/test_uuid.py +++ b/tests/model_fields/test_uuid.py @@ -3,7 +3,7 @@ import uuid from django.core import exceptions, serializers from django.db import models -from django.test import TestCase +from django.test import SimpleTestCase, TestCase from .models import ( NullableUUIDModel, PrimaryKeyUUIDModel, RelatedToUUIDModel, UUIDGrandchild, @@ -47,7 +47,7 @@ class TestSaveLoad(TestCase): UUIDModel.objects.create, field='not-a-uuid') -class TestMigrations(TestCase): +class TestMigrations(SimpleTestCase): def test_deconstruct(self): field = models.UUIDField() @@ -76,7 +76,7 @@ class TestQuerying(TestCase): ) -class TestSerialization(TestCase): +class TestSerialization(SimpleTestCase): test_data = '[{"fields": {"field": "550e8400-e29b-41d4-a716-446655440000"}, "model": "model_fields.uuidmodel", "pk": null}]' def test_dumping(self): @@ -89,7 +89,7 @@ class TestSerialization(TestCase): self.assertEqual(instance.field, uuid.UUID('550e8400-e29b-41d4-a716-446655440000')) -class TestValidation(TestCase): +class TestValidation(SimpleTestCase): def test_invalid_uuid(self): field = models.UUIDField() with self.assertRaises(exceptions.ValidationError) as cm: diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py index bb19af263c..8238aeaa93 100644 --- a/tests/model_fields/tests.py +++ b/tests/model_fields/tests.py @@ -223,7 +223,7 @@ class ForeignKeyTests(test.TestCase): ) -class ManyToManyFieldTests(test.TestCase): +class ManyToManyFieldTests(test.SimpleTestCase): def test_abstract_model_pending_operations(self): """ Many-to-many fields declared on abstract models should not add lazy relations to @@ -425,7 +425,7 @@ class BooleanFieldTests(test.TestCase): nb.save() # no error -class ChoicesTests(test.TestCase): +class ChoicesTests(test.SimpleTestCase): def test_choices_and_field_display(self): """ Check that get_choices and get_flatchoices interact with @@ -466,7 +466,7 @@ class SlugFieldTests(test.TestCase): self.assertEqual(bs.s, 'slug' * 50) -class ValidationTest(test.TestCase): +class ValidationTest(test.SimpleTestCase): def test_charfield_raises_error_on_empty_string(self): f = models.CharField() self.assertRaises(ValidationError, f.clean, "", None) @@ -738,7 +738,7 @@ class GenericIPAddressFieldTests(test.TestCase): self.assertEqual(loaded.ip, instance.ip) -class PromiseTest(test.TestCase): +class PromiseTest(test.SimpleTestCase): def test_AutoField(self): lazy_func = lazy(lambda: 1, int) self.assertIsInstance( |
