summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-01-22 03:01:54 +0100
committerFlorian Dold <florian.dold@gmail.com>2018-01-22 03:01:54 +0100
commit15c3b1b151ee124eb79b1c3ef740a92af50d1fc1 (patch)
treed3c7829b6f6bb2a0ff39c6bcf9eb34b37bce597b
parent912d757accb3a590ea9372762673466f03df7cac (diff)
downloaddonations-15c3b1b151ee124eb79b1c3ef740a92af50d1fc1.tar.gz
donations-15c3b1b151ee124eb79b1c3ef740a92af50d1fc1.tar.bz2
donations-15c3b1b151ee124eb79b1c3ef740a92af50d1fc1.zip
remove over-specific test case
-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()