]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/tests/utils.py
tests: Find test data relative to file location
[patchwork] / apps / patchwork / tests / utils.py
index 1cb5dfb95d529375b980d4629b7855790384ae55..f340f096e9021c6180d4856e345bec055f0e3eb3 100644 (file)
@@ -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')