[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-blog] branch master updated: no more /generate-contr
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-blog] branch master updated: no more /generate-contract in test |
Date: |
Wed, 10 Jan 2018 00:37:31 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository blog.
The following commit(s) were added to refs/heads/master by this push:
new 88cdca2 no more /generate-contract in test
88cdca2 is described below
commit 88cdca2b9618ac7b5374ff666650d13d7f9acda9
Author: Florian Dold <address@hidden>
AuthorDate: Wed Jan 10 00:37:26 2018 +0100
no more /generate-contract in test
---
talerblog/blog/blog.py | 3 +--
talerblog/tests.py | 31 -------------------------------
2 files changed, 1 insertion(+), 33 deletions(-)
diff --git a/talerblog/blog/blog.py b/talerblog/blog/blog.py
index 98af38d..9ac9021 100644
--- a/talerblog/blog/blog.py
+++ b/talerblog/blog/blog.py
@@ -109,9 +109,8 @@ def article(name, data=None):
# If not, create a new order.
order_id = flask.request.args.get("order_id")
if not order_id:
- pretty_name = article_name.replace("_", " ")
order = dict(
- summary=pretty_name,
+ summary="Essay: " + article_name.replace("_", " "),
fulfillment_url=make_url("/essay/" + quote(article_name)),
amount=ARTICLE_AMOUNT,
)
diff --git a/talerblog/tests.py b/talerblog/tests.py
index e72f316..8ad3556 100644
--- a/talerblog/tests.py
+++ b/talerblog/tests.py
@@ -49,37 +49,6 @@ class BlogTestCase(unittest.TestCase):
"reason": "Demo reimbursement",
"instance": self.instance})
- @patch("requests.post")
- def test_proposal_creation(self, mocked_post):
- ret_post = MagicMock()
- ret_post.status_code = 200
- ret_post.json.return_value = {}
- mocked_post.return_value = ret_post
- self.app.get("/generate-contract?nonce=55&article_name=Check_Me")
- mocked_post.assert_called_with(
- "http://backend.test.taler.net/proposal",
- json={
- "order": {
- "summary": "Check Me",
- "nonce": "55",
- "amount": blog.ARTICLE_AMOUNT,
- "max_fee": {
- "value": 1,
- "fraction": 0,
- "currency": CURRENCY},
- "products": [{
- "description": "Essay: Check Me",
- "quantity": 1,
- "product_id": 0,
- "price": blog.ARTICLE_AMOUNT}],
- "fulfillment_url": "http://localhost/essay/Check_Me",
- "pay_url": "http://localhost/pay",
- "merchant": {
- "instance":
TC["blog"]["instance"].value_string(required=True),
- "address": "nowhere",
- "name": "Kudos Inc.",
- "jurisdiction": "none"},
- "extra": {"article_name": "Check_Me"}}})
if __name__ == "__main__":
unittest.main()
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-blog] branch master updated: no more /generate-contract in test,
gnunet <=