You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
843 B
Python
30 lines
843 B
Python
5 years ago
|
from api.store import Store
|
||
|
import unittest
|
||
|
import json
|
||
|
import stripe
|
||
|
|
||
|
class TestStore(unittest.TestCase):
|
||
|
def setUp(self):
|
||
|
stripe.api_key = 'sk_test_I16uOM1ZfGALSc03AF0xqN2z'
|
||
|
def test_getPlans(self):
|
||
|
|
||
|
|
||
|
mystore = Store(product='music')
|
||
|
self.assertTrue(mystore.get.plans())
|
||
|
pass
|
||
|
def test_getUser(self):
|
||
|
"""
|
||
|
"""
|
||
|
email='nyemba@gmail.com'
|
||
|
mystore = Store(product='music')
|
||
|
self.assertTrue(mystore.get.user(email='nyemba@gmail.com'))
|
||
|
def test_UserPlan(self):
|
||
|
"""
|
||
|
For a given product we would like to know what our user's plan is
|
||
|
"""
|
||
|
email = 'nyemba@gmail.com'
|
||
|
mystore = Store(product='music')
|
||
|
print(mystore.get.plans(email=email))['id']
|
||
|
pass
|
||
|
if __name__ == '__main__':
|
||
|
unittest.main()
|