diff options
author | Dirk Wallenstein <halsmit@t-online.de> | 2012-05-03 02:45:39 +0000 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2012-05-04 08:47:45 +0800 |
commit | 700768a32f8ce8f6e263570043aa12606876bf1b (patch) | |
tree | 6fd53ba1d214df142d4987a21d544a9cf2c96a0c /apps | |
parent | 59ddd051801cf70c7841686ec2b45af523d0050e (diff) | |
download | patchwork-700768a32f8ce8f6e263570043aa12606876bf1b.tar patchwork-700768a32f8ce8f6e263570043aa12606876bf1b.tar.gz |
tests: Find test data relative to file location
Make test execution independent of the current directory.
Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/patchwork/tests/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/patchwork/tests/utils.py b/apps/patchwork/tests/utils.py index 1cb5dfb..f340f09 100644 --- a/apps/patchwork/tests/utils.py +++ b/apps/patchwork/tests/utils.py @@ -32,8 +32,8 @@ except ImportError: from email.MIMEMultipart import MIMEMultipart # helper functions for tests -_test_mail_dir = 'patchwork/tests/mail' -_test_patch_dir = 'patchwork/tests/patches' +_test_mail_dir = os.path.join(os.path.dirname(__file__), 'mail') +_test_patch_dir = os.path.join(os.path.dirname(__file__), 'patches') class defaults(object): project = Project(linkname = 'test-project', name = 'Test Project') |