gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-survey] branch master updated: remove wait page, fix


From: gnunet
Subject: [GNUnet-SVN] [taler-survey] branch master updated: remove wait page, fix syntax/import
Date: Thu, 18 Jan 2018 18:59:34 +0100

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

dold pushed a commit to branch master
in repository survey.

The following commit(s) were added to refs/heads/master by this push:
     new af77f8a  remove wait page, fix syntax/import
af77f8a is described below

commit af77f8a1cd3b75ba300993ca1bf0104920d4b3b2
Author: Florian Dold <address@hidden>
AuthorDate: Thu Jan 18 18:59:31 2018 +0100

    remove wait page, fix syntax/import
---
 talersurvey/survey/survey.py           |  3 +--
 talersurvey/survey/templates/wait.html |  7 -------
 talersurvey/tests.py                   | 36 ----------------------------------
 3 files changed, 1 insertion(+), 45 deletions(-)

diff --git a/talersurvey/survey/survey.py b/talersurvey/survey/survey.py
index d068f66..9b58572 100644
--- a/talersurvey/survey/survey.py
+++ b/talersurvey/survey/survey.py
@@ -22,7 +22,6 @@ from urllib.parse import urljoin
 import flask
 import requests
 from ..talerconfig import TalerConfig
-from .amount import Amount
 
 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
 app = flask.Flask(__name__, template_folder=BASE_DIR)
@@ -91,7 +90,7 @@ def submit_survey():
     resp = backend_post("tip-authorize", tip_spec)
 
     if resp.get("tip_redirect_url"):
-        flask.redirect(resp["tip_redirect_url"]
+        flask.redirect(resp["tip_redirect_url"])
 
     err_abort(500, message="Tipping failed, unexpected backend response",
               json=resp)
diff --git a/talersurvey/survey/templates/wait.html 
b/talersurvey/survey/templates/wait.html
deleted file mode 100644
index 81dd36a..0000000
--- a/talersurvey/survey/templates/wait.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{% extends "templates/base.html" %}
-
-{% block main %}
-  <p>
-    Please wait while the tip is being generated..
-  </p>
-{% endblock %}
diff --git a/talersurvey/tests.py b/talersurvey/tests.py
index 437a8d3..7dc2446 100644
--- a/talersurvey/tests.py
+++ b/talersurvey/tests.py
@@ -14,41 +14,5 @@ class SurveyTestCase(unittest.TestCase):
         survey.app.testing = True
         self.app = survey.app.test_client()
 
-    @patch("requests.post")
-    def test_authorize(self, mocked_post):
-        ret_post = MagicMock()
-        ret_post.status_code = 200
-        ret_post.json.return_value = {
-            "tip_id": "Jeppo02",
-            "tip_token": "mytiptoken",
-            "exchange_uri": "http://exchange.example.com/";,
-            "expiration": "/Date(2018)/"}
-        mocked_post.return_value = ret_post
-        self.app.post("/submit-survey")
-        mocked_post.assert_called_with(
-            "http://backend.test.taler.net/tip-authorize";,
-            json={
-                "pickup_url": "http://localhost/tip-pickup";,
-                "next_url": os.environ.get("TALER_ENV_URL_INTRO", 
"https://taler.net/";),
-                "amount": {
-                    "value": 1,
-                    "fraction": 0,
-                    "currency": CURRENCY},
-                "instance": "default",
-                "justification": "Payment methods survey"})
-
-    @patch("requests.post")
-    def test_pick(self, mocked_post):
-        ret_post = MagicMock()
-        ret_post.status_code = 200
-        ret_post.json.return_value = {}
-        mocked_post.return_value = ret_post
-        self.app.post("/tip-pickup",
-                      data="{}",
-                      content_type="application/json")
-        mocked_post.assert_called_with(
-            "http://backend.test.taler.net/tip-pickup";,
-            json={})
-
 if __name__ == "__main__":
     unittest.main()

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



reply via email to

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