[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-donations] branch master updated: remove over-specif
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-donations] branch master updated: remove over-specific test case |
Date: |
Mon, 22 Jan 2018 03:01:56 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository donations.
The following commit(s) were added to refs/heads/master by this push:
new 15c3b1b remove over-specific test case
15c3b1b is described below
commit 15c3b1b151ee124eb79b1c3ef740a92af50d1fc1
Author: Florian Dold <address@hidden>
AuthorDate: Mon Jan 22 03:01:54 2018 +0100
remove over-specific test case
---
talerdonations/tests.py | 46 ----------------------------------------------
1 file changed, 46 deletions(-)
diff --git a/talerdonations/tests.py b/talerdonations/tests.py
index 9a5d374..9a1365c 100644
--- a/talerdonations/tests.py
+++ b/talerdonations/tests.py
@@ -14,52 +14,6 @@ class DonationsTestCase(unittest.TestCase):
donations.app.testing = True
self.app = donations.app.test_client()
- @patch("requests.post")
- @patch("random.randint")
- @patch("datetime.datetime")
- def test_proposal_creation(self, mocked_datetime,
- mocked_random, mocked_post):
- mocked_datetime.today.return_value = datetime.today()
- mocked_random.return_value = 333
- order_id = "donation-%s-%X-%s" % \
- ("Tor", mocked_random(),
mocked_datetime.today().strftime("%H_%M_%S"))
- 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=44&donation_receiver=Tor&donation_amount=1.0")
- mocked_post.assert_called_with(
- "http://backend.test.taler.net/proposal",
- json={
- "order": {
- "summary": "Donation!",
- "nonce": "44",
- "amount": {
- "value": 1,
- "fraction": 0,
- "currency": CURRENCY},
- "max_fee": {
- "value": 1,
- "fraction": 0,
- "currency": CURRENCY},
- "order_id": order_id,
- "products": [{
- "description": "Donation to Tor",
- "quantity": 1,
- "product_id": 0,
- "price": {
- "value": 1,
- "fraction": 0,
- "currency": CURRENCY}}],
- "fulfillment_url":
- "http://localhost/fulfillment?order_id=%s" % order_id,
- "pay_url": "http://localhost/pay",
- "merchant": {
- "instance": "Tor",
- "address": "nowhere",
- "name": "Kudos Inc.",
- "jurisdiction": "none"}}})
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-donations] branch master updated: remove over-specific test case,
gnunet <=