summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorNavaL <mnandri@thoughtworks.com>2016-01-26 11:10:25 +0100
committerNavaL <mnandri@thoughtworks.com>2016-01-28 10:43:14 +0100
commit29f0bd4576955536d3714b1c095bcfe387ec51b9 (patch)
tree4c5c37f8d6f93baceb56686a3e17eb3205310b8a /service
parent47bcedd023c71ff89385de81de89e8766e5c3ef8 (diff)
removed unnecessary imports, and wrong yields
Issue #576
Diffstat (limited to 'service')
-rw-r--r--service/test/integration/test_multi_user_login.py2
-rw-r--r--service/test/support/integration/multi_user_client.py24
2 files changed, 5 insertions, 21 deletions
diff --git a/service/test/integration/test_multi_user_login.py b/service/test/integration/test_multi_user_login.py
index 029d6f26..307551d5 100644
--- a/service/test/integration/test_multi_user_login.py
+++ b/service/test/integration/test_multi_user_login.py
@@ -37,7 +37,7 @@ class MultiUserLoginTest(MultiUserClient, SoledadTestBase):
mail = load_mail_from_file('mbox00000000')
mail_id = yield self._create_mail_in_soledad(mail)
expected_mail_dict = {'body': u'Dignissimos ducimus veritatis. Est tenetur consequatur quia occaecati. Vel sit sit voluptas.\n\nEarum distinctio eos. Accusantium qui sint ut quia assumenda. Facere dignissimos inventore autem sit amet. Pariatur voluptatem sint est.\n\nUt recusandae praesentium aspernatur. Exercitationem amet placeat deserunt quae consequatur eum. Unde doloremque suscipit quia.\n\n', 'header': {u'date': u'Tue, 21 Apr 2015 08:43:27 +0000 (UTC)', u'to': [u'carmel@murazikortiz.name'], u'x-tw-pixelated-tags': u'nite, macro, trash', u'from': u'darby.senger@zemlak.biz', u'subject': u'Itaque consequatur repellendus provident sunt quia.'}, 'ident': mail_id, 'status': [], 'tags': [], 'textPlainBody': u'Dignissimos ducimus veritatis. Est tenetur consequatur quia occaecati. Vel sit sit voluptas.\n\nEarum distinctio eos. Accusantium qui sint ut quia assumenda. Facere dignissimos inventore autem sit amet. Pariatur voluptatem sint est.\n\nUt recusandae praesentium aspernatur. Exercitationem amet placeat deserunt quae consequatur eum. Unde doloremque suscipit quia.\n\n', 'mailbox': u'inbox', 'attachments': [], 'security_casing': {'imprints': [{'state': 'no_signature_information'}], 'locks': []}}
- response, request = yield self.get("/mail/%s" % mail_id, from_request=login_request)
+ response, request = self.get("/mail/%s" % mail_id, from_request=login_request)
response = yield response
self.assertEqual(200, request.code)
diff --git a/service/test/support/integration/multi_user_client.py b/service/test/support/integration/multi_user_client.py
index 2aa7d3ff..13e1b64b 100644
--- a/service/test/support/integration/multi_user_client.py
+++ b/service/test/support/integration/multi_user_client.py
@@ -13,36 +13,20 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-import json
-import shutil
+from leap.auth import SRPAuth
from leap.exceptions import SRPAuthenticationError
-from leap.mail.imap.account import IMAPAccount
-from mockito import mock, when, any as ANY
-from twisted.cred import portal
-from twisted.cred.checkers import AllowAnonymousAccess
+from mockito import mock, when
from twisted.internet import defer
-from leap.auth import SRPAuth
-
-from pixelated.adapter.mailstore.leap_attachment_store import LeapAttachmentStore
-from pixelated.adapter.services.feedback_service import FeedbackService
from pixelated.application import UserAgentMode, ServicesFactory, set_up_protected_resources
-
-from pixelated.adapter.mailstore import LeapMailStore
-from pixelated.adapter.mailstore.searchable_mailstore import SearchableMailStore
-
-from pixelated.adapter.search import SearchEngine
-from pixelated.adapter.services.draft_service import DraftService
from pixelated.bitmask_libraries.session import LeapSession, LeapSessionFactory
import pixelated.config.services
# from pixelated.config.services import Services
-from pixelated.resources.auth import LeapPasswordChecker, SessionChecker, PixelatedRealm, PixelatedAuthSessionWrapper
-from pixelated.resources.login_resource import LoginResource
from pixelated.resources.root_resource import RootResource
from test.support.integration import AppTestClient
-from test.support.integration.app_test_client import initialize_soledad, AppTestAccount
-import test.support.mockito
+from test.support.integration.app_test_client import AppTestAccount
+
from test.support.test_helper import request_mock