From 64b2e37cfc15eff18da473fa20f076c22a5f904b Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Thu, 30 Jul 2015 12:50:57 +0000 Subject: Removed relative import of test resources. - test_contacts.py and test_commands.py --- service/test/integration/test_contacts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'service/test/integration/test_contacts.py') diff --git a/service/test/integration/test_contacts.py b/service/test/integration/test_contacts.py index a838e15b..d2e2ac2a 100644 --- a/service/test/integration/test_contacts.py +++ b/service/test/integration/test_contacts.py @@ -15,8 +15,8 @@ # along with Pixelated. If not, see . from test.support.integration import SoledadTestBase, MailBuilder from twisted.internet import defer -import os import json +import pkg_resources class ContactsTest(SoledadTestBase): @@ -97,7 +97,7 @@ class ContactsTest(SoledadTestBase): self.assertIn('this_mail_was_not@bounced.com', contacts) def _bounced_mail_hdoc_content(self): - hdoc_file = os.path.join(os.path.dirname(__file__), '..', 'unit', 'fixtures', 'bounced_mail_hdoc.json') + hdoc_file = pkg_resources.resource_filename('test.unit.fixtures', 'bounced_mail_hdoc.json') with open(hdoc_file) as f: hdoc = json.loads(f.read()) return hdoc -- cgit v1.2.3