summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--talerdonations/tests.py46
1 files changed, 0 insertions, 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()