upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-django-fake-model / trunk / django2.diff
blob9bcb758141a4d683858b547ab2b3d3b3f2465f85
1 diff --git a/tests/test_class_extension.py b/tests/test_class_extension.py
2 index 066283a..09662d2 100644
3 --- a/tests/test_class_extension.py
4 +++ b/tests/test_class_extension.py
5 @@ -1,10 +1,10 @@
6 from __future__ import unicode_literals
7 -from django.test import TestCase
8 +from django.test import TransactionTestCase
9 from tests.fake_models import MyFakeModel
12 @MyFakeModel.fake_me
13 -class MyFakeModelTests(TestCase):
14 +class MyFakeModelTests(TransactionTestCase):
16 def test_create_model(self):
17 MyFakeModel.objects.create(name='123')
18 diff --git a/tests/test_func_decorator.py b/tests/test_func_decorator.py
19 index 4394e7c..37a05fa 100644
20 --- a/tests/test_func_decorator.py
21 +++ b/tests/test_func_decorator.py
22 @@ -1,9 +1,9 @@
23 from __future__ import unicode_literals
24 -from django.test import TestCase
25 +from django.test import TransactionTestCase
26 from tests.fake_models import MyFakeModel
29 -class MyFakeModelTests(TestCase):
30 +class MyFakeModelTests(TransactionTestCase):
32 @MyFakeModel.fake_me
33 def test_create_model(self):
34 diff --git a/tests/test_related_model.py b/tests/test_related_model.py
35 index 4184a68..5be0ad6 100644
36 --- a/tests/test_related_model.py
37 +++ b/tests/test_related_model.py
38 @@ -11,7 +11,7 @@ class RelatedModel(f.FakeModel):
40 class MyModel(f.FakeModel):
41 text = models.CharField(max_length=400)
42 - related_model = models.ForeignKey(RelatedModel)
43 + related_model = models.ForeignKey(RelatedModel, on_delete=models.CASCADE)
46 @MyModel.fake_me