summaryrefslogtreecommitdiff
path: root/service/test
diff options
context:
space:
mode:
authorNeissi Torres Lima <neissi.lima@gmail.com>2014-12-11 18:03:52 -0200
committerNeissi Torres Lima <neissi.lima@gmail.com>2014-12-11 18:03:52 -0200
commit98cfd8d90cb4d077505480786e8bc6718d17c308 (patch)
treeeac4c8d3bef869f355cd732062245b1a76e760c8 /service/test
parent833952f71a6e9e757848dc4b2c6acd4321c1dd8d (diff)
Fixed delete mails from mail list, actions
Diffstat (limited to 'service/test')
-rw-r--r--service/test/support/integration/app_test_client.py4
-rw-r--r--service/test/support/integration/soledad_test_base.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py
index b2824770..2a35a89f 100644
--- a/service/test/support/integration/app_test_client.py
+++ b/service/test/support/integration/app_test_client.py
@@ -110,8 +110,8 @@ class AppTestClient:
request = requestMock(path=path, method="PUT", body=body, headers={'Content-Type': ['application/json']})
return self._render(request)
- def delete(self, path):
- request = requestMock(path=path, method="DELETE")
+ def delete(self, path, body=""):
+ request = requestMock(path=path, body=body, headers={'Content-Type': ['application/json']}, method="DELETE")
return self._render(request)
def add_document_to_soledad(self, _dict):
diff --git a/service/test/support/integration/soledad_test_base.py b/service/test/support/integration/soledad_test_base.py
index da9d74dc..40181664 100644
--- a/service/test/support/integration/soledad_test_base.py
+++ b/service/test/support/integration/soledad_test_base.py
@@ -66,6 +66,10 @@ class SoledadTestBase(unittest.TestCase):
res, req = self.client.delete("/mail/%s" % mail_ident)
return req
+ def delete_mails(self, idents):
+ res, req = self.client.delete("/mails", json.dumps({'idents': idents}))
+ return req
+
def mark_as_read(self, mail_ident):
res, req = self.client.post("/mail/%s/read" % mail_ident)
return req