gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-bank] branch master updated: testing compression


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] branch master updated: testing compression
Date: Tue, 21 May 2019 13:41:24 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository bank.

The following commit(s) were added to refs/heads/master by this push:
     new a670306  testing compression
a670306 is described below

commit a670306272f7ab051672ca8b721e7ac2e8e29d2a
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue May 21 13:41:18 2019 +0200

    testing compression
---
 talerbank/app/tests.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/talerbank/app/tests.py b/talerbank/app/tests.py
index ca921ec..2aa1c57 100644
--- a/talerbank/app/tests.py
+++ b/talerbank/app/tests.py
@@ -19,6 +19,7 @@
 
 import json
 import time
+import zlib
 import timeit
 import logging
 from urllib.parse import unquote
@@ -285,6 +286,19 @@ class AddIncomingTestCase(TestCase):
             **{"HTTP_X_TALER_BANK_USERNAME": "user_user",
                "HTTP_X_TALER_BANK_PASSWORD": "user_password"})
         self.assertEqual(200, response.status_code)
+
+        # Trying the same request, but compressed.
+        zdata = zlib.compress(bytes(data, "utf-8"))
+        response = client.post(
+            reverse("add-incoming", urlconf=urls),
+            data=zdata,
+            content_type="application/json",
+            follow=True,
+            **{"HTTP_X_TALER_BANK_USERNAME": "user_user",
+               "HTTP_X_TALER_BANK_PASSWORD": "user_password",
+               "HTTP_CONTENT_ENCODING": "deflate"})
+        self.assertEqual(200, response.status_code)
+
         data = '{"auth": {"type": "basic"}, \
                  "credit_account": 1, \
                  "subject": "TESTWTID", \

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]