summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-06-22 02:37:37 -0300
committerVictor Shyba <victor1984@riseup.net>2017-07-02 01:32:39 -0300
commit32322267dd9e89cb6f0ed07ac7869a57f0eaeb47 (patch)
tree885ef1e37920297d3a127c52f42b02b1272c6e65 /testing
parentb9a906aadbf9561cff76d406d89b644ee1f0e67a (diff)
[bug] incoming doesnt accept encryption schemes
According to /incoming specification, this parameter doesn't exists. It was added on MX side and brought here on transition. This commit explicitly removes it, leaving a track on history that it got removed during transition. Further work on MX will also remove the "NONE" encryption scheme, which is part of dead code.
Diffstat (limited to 'testing')
-rw-r--r--testing/tests/server/test_incoming_resource.py4
-rw-r--r--testing/tests/server/test_incoming_server.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/testing/tests/server/test_incoming_resource.py b/testing/tests/server/test_incoming_resource.py
index e9148b4a..16e1e720 100644
--- a/testing/tests/server/test_incoming_resource.py
+++ b/testing/tests/server/test_incoming_resource.py
@@ -38,9 +38,9 @@ class IncomingResourceTestCase(unittest.TestCase):
def test_save_document(self):
formatter = IncomingFormatter()
- doc_id, scheme = uuid4().hex, EncryptionSchemes.NONE
+ doc_id, scheme = uuid4().hex, EncryptionSchemes.PUBKEY
content = 'Incoming content'
- request = DummyRequest([self.user_uuid, doc_id, scheme])
+ request = DummyRequest([self.user_uuid, doc_id])
request.content = BytesIO(content)
self.resource.render_PUT(request)
diff --git a/testing/tests/server/test_incoming_server.py b/testing/tests/server/test_incoming_server.py
index afb0c970..64ac4353 100644
--- a/testing/tests/server/test_incoming_server.py
+++ b/testing/tests/server/test_incoming_server.py
@@ -51,9 +51,9 @@ class IncomingServerTestCase(CouchDBTestCase):
@pytest.mark.usefixtures("method_tmpdir")
def test_put_incoming_creates_a_document(self):
user_id, doc_id = self.user_id, uuid4().hex
- content, scheme = 'Hi', EncryptionSchemes.NONE
+ content, scheme = 'Hi', EncryptionSchemes.PUBKEY
formatter = IncomingFormatter()
- incoming_endpoint = self.uri + '%s/%s/%s' % (user_id, doc_id, scheme)
+ incoming_endpoint = self.uri + '%s/%s' % (user_id, doc_id)
yield treq.put(incoming_endpoint, BytesIO(content), persistent=False)
db = self.state.open_database(user_id)