diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-07-21 09:05:37 +0000 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-11 17:00:26 +0200 |
commit | 4df3237b8b5d6b829c05c61dc3c21f9e782950de (patch) | |
tree | d62dfcfb792cce48186fee01ee068c4a5514b9a3 /service/test/unit | |
parent | da3cb330b6959cb7c84b6200fa2041aa9e4f7c9c (diff) |
Fixed relative file import in test_soledad_querier.py.
Diffstat (limited to 'service/test/unit')
-rw-r--r-- | service/test/unit/adapter/test_soledad_querier.py | 4 | ||||
-rw-r--r-- | service/test/unit/fixtures/__init__.py | 0 |
2 files changed, 2 insertions, 2 deletions
diff --git a/service/test/unit/adapter/test_soledad_querier.py b/service/test/unit/adapter/test_soledad_querier.py index e15484d4..9e5e8d9a 100644 --- a/service/test/unit/adapter/test_soledad_querier.py +++ b/service/test/unit/adapter/test_soledad_querier.py @@ -18,12 +18,12 @@ import json import base64 import quopri from uuid import uuid4 +import pkg_resources import pixelated.adapter.soledad.soledad_facade_mixin from pixelated.adapter.soledad.soledad_querier import SoledadQuerier from mockito import mock, when, any, unstub from twisted.internet import defer -import os class SoledadQuerierTest(unittest.TestCase): @@ -37,7 +37,7 @@ class SoledadQuerierTest(unittest.TestCase): bdoc = mock() bdoc.content = {'raw': 'esse papo seu ta qualquer coisa'} when(soledad).get_from_index('by-type-and-payloadhash', 'cnt', any(unicode)).thenReturn([bdoc]) - multipart_attachment_file = os.path.join(os.path.dirname(__file__), '..', 'fixtures', 'multipart_attachment.json') + multipart_attachment_file = pkg_resources.resource_filename('test.unit.fixtures', 'multipart_attachment.json') with open(multipart_attachment_file) as f: hdoc = json.loads(f.read()) querier = SoledadQuerier(soledad) diff --git a/service/test/unit/fixtures/__init__.py b/service/test/unit/fixtures/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/service/test/unit/fixtures/__init__.py |