예제 #1
0
 def test_customer(self):
     customer = self.customer
     json_data = customer_adapter(customer, self.dummy_request)
     expected = dict(
         guid=customer.guid,
         processor_uri=customer.processor_uri,
         created_at=customer.created_at.isoformat(),
         updated_at=customer.updated_at.isoformat(),
         company_guid=customer.company_guid,
         deleted=customer.deleted,
     )
     self.assertEqual(json_data, expected)
예제 #2
0
 def test_customer(self):
     customer = self.customer
     json_data = customer_adapter(customer, self.dummy_request)
     expected = dict(
         guid=customer.guid,
         processor_uri=customer.processor_uri,
         created_at=customer.created_at.isoformat(),
         updated_at=customer.updated_at.isoformat(),
         company_guid=customer.company_guid,
         deleted=customer.deleted,
     )
     self.assertEqual(json_data, expected)
예제 #3
0
 def test_customer(self):
     from billy.models.customer import CustomerModel
     from billy.renderers import customer_adapter
     customer_model = CustomerModel(self.testapp.session)
     customer = customer_model.get(self.customer_guid)
     json_data = customer_adapter(customer, self.dummy_request)
     expected = dict(
         guid=customer.guid,
         external_id=customer.external_id, 
         created_at=customer.created_at.isoformat(),
         updated_at=customer.updated_at.isoformat(),
         company_guid=customer.company_guid, 
         deleted=customer.deleted, 
     )
     self.assertEqual(json_data, expected)