Commit 614e6ac0 authored by Jérome Perrin's avatar Jérome Perrin Committed by Arnaud Fontaine

erp5_stripe: Fix test simulating a webhook request made by stripe.

The real request has the `CONTENT_TYPE` header so do the same in the test. This
was working anyway without the header on py2 but not on py3.
parent dac1a00c
...@@ -477,6 +477,7 @@ class TestStripePaymentSession(ERP5TypeTestCase): ...@@ -477,6 +477,7 @@ class TestStripePaymentSession(ERP5TypeTestCase):
}) })
}).encode()), }).encode()),
request_method="POST", request_method="POST",
env={'CONTENT_TYPE': 'application/json'},
handle_errors=False) handle_errors=False)
self.assertEqual(200, ret.getStatus()) self.assertEqual(200, ret.getStatus())
self.tic() self.tic()
...@@ -673,6 +674,7 @@ class TestStripePaymentSession(ERP5TypeTestCase): ...@@ -673,6 +674,7 @@ class TestStripePaymentSession(ERP5TypeTestCase):
}) })
}).encode()), }).encode()),
request_method="POST", request_method="POST",
env={'CONTENT_TYPE': 'application/json'},
handle_errors=False) handle_errors=False)
self.assertEqual(200, ret.getStatus()) self.assertEqual(200, ret.getStatus())
self.tic() self.tic()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment