#17 feat(API): add external id to customers on api.

This commit is contained in:
2025-08-30 15:24:42 -05:00
parent 477405a094
commit e3f571afc5
2 changed files with 4 additions and 2 deletions

View File

@@ -16,7 +16,8 @@ class TestAPI(APITestCase):
measuring_unit='UNIT'
)
self.customer = Customer.objects.create(
name='Camilo'
name='Camilo',
external_id='18'
)
def test_create_sale(self):
@@ -67,6 +68,7 @@ class TestAPI(APITestCase):
json_response = json.loads(response.content.decode('utf-8'))
self.assertEqual(response.status_code, 200)
self.assertEqual(self.customer.name, json_response[0]['name'])
self.assertEqual(self.customer.external_id, json_response[0]['external_id'])
def test_get_sales_for_tryton(self):
url = '/don_confiao/api/sales/for_tryton'