summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-08-30 23:57:35 -0300
committerdrebs <drebs@riseup.net>2017-09-05 11:08:48 -0300
commit115bfd7ca890e5d1a9bdd9df88efc376211cec10 (patch)
treef9b16a5e697e6bafcbaaf6d3e3c1b8a6afc4f8ea /testing
parent7dcdfdfa66605e4cb2249746f2c157e768f3afe8 (diff)
[bug] add schema to incoming couchdb backend
Schema was using a default value instead of using the one passed as a parameter. Additional test for formatter is also included. -- Related: #8867
Diffstat (limited to 'testing')
-rw-r--r--testing/tests/server/test_incoming_resource.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/testing/tests/server/test_incoming_resource.py b/testing/tests/server/test_incoming_resource.py
index 16e1e720..0d4918b9 100644
--- a/testing/tests/server/test_incoming_resource.py
+++ b/testing/tests/server/test_incoming_resource.py
@@ -50,3 +50,8 @@ class IncomingResourceTestCase(unittest.TestCase):
doc = self.couchdb.put_doc.call_args[0][0]
self.assertEquals(doc_id, doc.doc_id)
self.assertEquals(formatter.format(content, scheme), doc.content)
+
+ def test_formatter(self):
+ formatter = IncomingFormatter()
+ formatted = formatter.format('content', EncryptionSchemes.PUBKEY)
+ self.assertEquals(formatted['_enc_scheme'], EncryptionSchemes.PUBKEY)