|
3 | 3 | import os, shutil |
4 | 4 | from datetime import date, timedelta, time |
5 | 5 |
|
6 | | -import django.test |
7 | 6 | from django.core.urlresolvers import reverse as urlreverse |
8 | 7 | from django.conf import settings |
9 | 8 |
|
|
19 | 18 | from ietf.utils.test_utils import login_testing_unauthorized |
20 | 19 | from ietf.utils.test_data import make_test_data |
21 | 20 | from ietf.utils.mail import outbox |
| 21 | +from ietf.utils import TestCase |
22 | 22 |
|
23 | 23 |
|
24 | | -class ChangeStateTestCase(django.test.TestCase): |
25 | | - fixtures = ['names'] |
| 24 | +class ChangeStateTestCase(TestCase): |
| 25 | + # See ietf.utils.test_utils.TestCase for the use of perma_fixtures vs. fixtures |
| 26 | + perma_fixtures = ['names'] |
26 | 27 |
|
27 | 28 | def test_change_state(self): |
28 | 29 | draft = make_test_data() |
@@ -177,8 +178,9 @@ def test_request_last_call(self): |
177 | 178 | self.assertTrue("Last call was requested" in draft.latest_event().desc) |
178 | 179 |
|
179 | 180 |
|
180 | | -class EditInfoTestCase(django.test.TestCase): |
181 | | - fixtures = ['names'] |
| 181 | +class EditInfoTestCase(TestCase): |
| 182 | + # See ietf.utils.test_utils.TestCase for the use of perma_fixtures vs. fixtures |
| 183 | + perma_fixtures = ['names'] |
182 | 184 |
|
183 | 185 | def test_edit_info(self): |
184 | 186 | draft = make_test_data() |
@@ -359,8 +361,9 @@ def test_edit_consensus(self): |
359 | 361 | self.assertEqual(draft.latest_event(ConsensusDocEvent, type="changed_consensus").consensus, True) |
360 | 362 |
|
361 | 363 |
|
362 | | -class ResurrectTestCase(django.test.TestCase): |
363 | | - fixtures = ['names'] |
| 364 | +class ResurrectTestCase(TestCase): |
| 365 | + # See ietf.utils.test_utils.TestCase for the use of perma_fixtures vs. fixtures |
| 366 | + perma_fixtures = ['names'] |
364 | 367 |
|
365 | 368 | def test_request_resurrect(self): |
366 | 369 | draft = make_test_data() |
@@ -426,8 +429,9 @@ def test_resurrect(self): |
426 | 429 | self.assertEquals(len(outbox), mailbox_before + 1) |
427 | 430 |
|
428 | 431 |
|
429 | | -class ExpireIDsTestCase(django.test.TestCase): |
430 | | - fixtures = ['names'] |
| 432 | +class ExpireIDsTestCase(TestCase): |
| 433 | + # See ietf.utils.test_utils.TestCase for the use of perma_fixtures vs. fixtures |
| 434 | + perma_fixtures = ['names'] |
431 | 435 |
|
432 | 436 | def setUp(self): |
433 | 437 | self.id_dir = os.path.abspath("tmp-id-dir") |
@@ -608,8 +612,9 @@ def test_clean_up_draft_files(self): |
608 | 612 | self.assertTrue(not os.path.exists(os.path.join(self.id_dir, txt))) |
609 | 613 | self.assertTrue(os.path.exists(os.path.join(self.archive_dir, "deleted_tombstones", txt))) |
610 | 614 |
|
611 | | -class ExpireLastCallTestCase(django.test.TestCase): |
612 | | - fixtures = ['names'] |
| 615 | +class ExpireLastCallTestCase(TestCase): |
| 616 | + # See ietf.utils.test_utils.TestCase for the use of perma_fixtures vs. fixtures |
| 617 | + perma_fixtures = ['names'] |
613 | 618 |
|
614 | 619 | def test_expire_last_call(self): |
615 | 620 | from ietf.doc.lastcall import get_expired_last_calls, expire_last_call |
@@ -657,9 +662,9 @@ def test_expire_last_call(self): |
657 | 662 | self.assertEquals(len(outbox), mailbox_before + 1) |
658 | 663 | self.assertTrue("Last Call Expired" in outbox[-1]["Subject"]) |
659 | 664 |
|
660 | | -class IndividualInfoFormsTestCase(django.test.TestCase): |
661 | | - |
662 | | - fixtures = ['names'] |
| 665 | +class IndividualInfoFormsTestCase(TestCase): |
| 666 | + # See ietf.utils.test_utils.TestCase for the use of perma_fixtures vs. fixtures |
| 667 | + perma_fixtures = ['names'] |
663 | 668 |
|
664 | 669 | def test_doc_change_stream(self): |
665 | 670 | url = urlreverse('doc_change_stream', kwargs=dict(name=self.docname)) |
@@ -885,8 +890,9 @@ def setUp(self): |
885 | 890 | self.docname='draft-ietf-mars-test' |
886 | 891 | self.doc = Document.objects.get(name=self.docname) |
887 | 892 |
|
888 | | -class SubmitToIesgTestCase(django.test.TestCase): |
889 | | - fixtures = ['names'] |
| 893 | +class SubmitToIesgTestCase(TestCase): |
| 894 | + # See ietf.utils.test_utils.TestCase for the use of perma_fixtures vs. fixtures |
| 895 | + perma_fixtures = ['names'] |
890 | 896 |
|
891 | 897 | def verify_permissions(self): |
892 | 898 |
|
@@ -945,8 +951,9 @@ def setUp(self): |
945 | 951 | self.doc = Document.objects.get(name=self.docname) |
946 | 952 | self.doc.unset_state('draft-iesg') |
947 | 953 |
|
948 | | -class RequestPublicationTestCase(django.test.TestCase): |
949 | | - fixtures = ['names'] |
| 954 | +class RequestPublicationTestCase(TestCase): |
| 955 | + # See ietf.utils.test_utils.TestCase for the use of perma_fixtures vs. fixtures |
| 956 | + perma_fixtures = ['names'] |
950 | 957 |
|
951 | 958 | def test_request_publication(self): |
952 | 959 | draft = make_test_data() |
|
0 commit comments