mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-24 05:31:26 -05:00
python3 compatibility + webapp to flask refactoring
This commit is contained in:
+42
@@ -0,0 +1,42 @@
|
||||
import libraries.stripe
|
||||
from libraries.stripe.test.helper import (
|
||||
StripeResourceTest, DUMMY_PLAN
|
||||
)
|
||||
|
||||
|
||||
class PlanTest(StripeResourceTest):
|
||||
|
||||
def test_create_plan(self):
|
||||
libraries.stripe.Plan.create(**DUMMY_PLAN)
|
||||
|
||||
self.requestor_mock.request.assert_called_with(
|
||||
'post',
|
||||
'/v1/plans',
|
||||
DUMMY_PLAN,
|
||||
None
|
||||
)
|
||||
|
||||
def test_delete_plan(self):
|
||||
p = libraries.stripe.Plan(id="pl_delete")
|
||||
p.delete()
|
||||
|
||||
self.requestor_mock.request.assert_called_with(
|
||||
'delete',
|
||||
'/v1/plans/pl_delete',
|
||||
{},
|
||||
None
|
||||
)
|
||||
|
||||
def test_update_plan(self):
|
||||
p = libraries.stripe.Plan(id="pl_update")
|
||||
p.name = "Plan Name"
|
||||
p.save()
|
||||
|
||||
self.requestor_mock.request.assert_called_with(
|
||||
'post',
|
||||
'/v1/plans/pl_update',
|
||||
{
|
||||
'name': 'Plan Name',
|
||||
},
|
||||
None
|
||||
)
|
||||
Reference in New Issue
Block a user