def test_missing_id(self): customer = stripe.Customer() self.assertRaises(stripe.InvalidRequestError, customer.refresh)
def customer(self): return stripe.Customer(api_key=self.api_key)
def test_cannot_set_empty_string(self): customer = stripe.Customer() self.assertRaises(ValueError, setattr, customer, "description", "")
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')"