def test_retrieve_deleted_customer(self): id = 'cus_7GafGMbML8R28Io' with HTTMock(helper.mock_api('/customers/' + id, 'customers/retrieve_deleted.txt')): customer = WebPay('test_key').customers.retrieve(id) assert customer.id == id assert customer.is_deleted()
def test_retrieve_no_card_customer(self): id = 'cus_eS6dGfa8BeUlbSQ' with HTTMock(helper.mock_api('/customers/' + id, 'customers/retrieve_no_card.txt')): customer = WebPay('test_key').customers.retrieve(id) assert customer.id == id assert not customer.is_deleted() assert customer.active_card is None
def test_retrieve(self): id = 'cus_39o4Fv82E1et5Xb' with HTTMock(helper.mock_api('/customers/' + id, 'customers/retrieve.txt')): customer = WebPay('test_key').customers.retrieve(id) assert customer.id == id assert not customer.is_deleted() assert customer.active_card.name == 'YUUKO SHIONJI'