X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=patchwork%2Ftests%2Ftest_patchparser.py;h=a49bf9b8d79a4bc095cf1d3cb7ac224e5fbfb241;hb=ed3250d636b024973f527899ee6bc7210ccfb5b4;hp=da2b07a96c8a38b156ab0f467f9e93368c65bd26;hpb=85916e6c56076a29c6113e169d3e4926a7c886b1;p=patchwork diff --git a/patchwork/tests/test_patchparser.py b/patchwork/tests/test_patchparser.py index da2b07a..a49bf9b 100644 --- a/patchwork/tests/test_patchparser.py +++ b/patchwork/tests/test_patchparser.py @@ -25,13 +25,10 @@ from patchwork.models import Project, Person, Patch, Comment, State, \ from patchwork.tests.utils import read_patch, read_mail, create_email, \ defaults, create_user -try: - from email.mime.text import MIMEText -except ImportError: - # Python 2.4 compatibility - from email.MIMEText import MIMEText +from email.mime.text import MIMEText class PatchTest(TestCase): + fixtures = ['default_states'] default_sender = defaults.sender default_subject = defaults.subject project = defaults.project @@ -246,6 +243,7 @@ class MultipleProjectPatchTest(TestCase): """ Test that patches sent to multiple patchwork projects are handled correctly """ + fixtures = ['default_states'] test_comment = 'Test Comment' patch_filename = '0001-add-line.patch' msgid = '<1@example.com>' @@ -449,6 +447,7 @@ class NoNewlineAtEndOfFilePatchTest(MBoxPatchTest): self.assertEqual(2, patch.content.count('\ No newline at end of file')) class DelegateRequestTest(TestCase): + fixtures = ['default_states'] patch_filename = '0001-add-line.patch' msgid = '<1@example.com>' invalid_delegate_email = "nobody" @@ -494,6 +493,7 @@ class DelegateRequestTest(TestCase): self.user.delete() class InitialPatchStateTest(TestCase): + fixtures = ['default_states'] patch_filename = '0001-add-line.patch' msgid = '<1@example.com>' invalid_state_name = "Nonexistent Test State" @@ -558,7 +558,7 @@ class ParseInitialTagsTest(PatchTest): test_comment = ('test comment\n\n' + 'Tested-by: Test User \n' + 'Reviewed-by: Test User \n') - fixtures = ['default_tags'] + fixtures = ['default_tags', 'default_states'] def setUp(self): project = defaults.project