diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2008-09-20 12:14:23 +1000 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2008-09-20 12:14:23 +1000 |
commit | 04d8e8e08c06d8dafccdfaf90352b473d5e0d048 (patch) | |
tree | f19bff0f2f45b13f4373af5ff0f88bfa93200589 | |
parent | 9e12fad86bebbd70025b948cc0ea9fbff44a725a (diff) | |
download | patchwork-04d8e8e08c06d8dafccdfaf90352b473d5e0d048.tar.bz2 patchwork-04d8e8e08c06d8dafccdfaf90352b473d5e0d048.tar.xz |
[test] 2.4-ise test cases
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r-- | apps/patchwork/tests/patchparser.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/patchwork/tests/patchparser.py b/apps/patchwork/tests/patchparser.py index 6fe7968..eb07eb7 100644 --- a/apps/patchwork/tests/patchparser.py +++ b/apps/patchwork/tests/patchparser.py @@ -19,11 +19,17 @@ import unittest import os -from email.mime.text import MIMEText -from email.mime.multipart import MIMEMultipart from email import message_from_string from patchwork.models import Project, Person +try: + from email.mime.text import MIMEText + from email.mime.multipart import MIMEMultipart +except ImportError: + # Python 2.4 compatibility + from email.MIMEText import MIMEText + from email.MIMEMultipart import MIMEMultipart + test_mail_dir = 'patchwork/tests/mail' test_patch_dir = 'patchwork/tests/patches' |