예제 #1
0
 def test_missing_id(self):
     customer = stripe.Customer()
     self.assertRaises(stripe.InvalidRequestError, customer.refresh)
예제 #2
0
 def customer(self):
     return stripe.Customer(api_key=self.api_key)
예제 #3
0
 def test_cannot_set_empty_string(self):
     customer = stripe.Customer()
     self.assertRaises(ValueError, setattr, customer, "description", "")
예제 #4
0
def test_entity():
    # entity shows the id and the name.
    customer = stripe.Customer(id="cust_foo")
    customer.update({"name": "Foo"})
    assert repr(customer) == "Customer(id='cust_foo', name='Foo')"