#17 feat(API): add external id to sales on api.
This commit is contained in:
		| @@ -73,6 +73,19 @@ class TestAPI(APITestCase): | ||||
|             json_response[0]['external_id'] | ||||
|         ) | ||||
|  | ||||
|     def test_get_sales(self): | ||||
|         url = '/don_confiao/api/sales/' | ||||
|         self._create_sale() | ||||
|  | ||||
|         response = self.client.get(url) | ||||
|         json_response = json.loads(response.content.decode('utf-8')) | ||||
|         self.assertEqual(response.status_code, 200) | ||||
|         self.assertEqual(self.customer.id, json_response[0]['customer']) | ||||
|         self.assertEqual( | ||||
|             None, | ||||
|             json_response[0]['external_id'] | ||||
|         ) | ||||
|  | ||||
|     def test_get_sales_for_tryton(self): | ||||
|         url = '/don_confiao/api/sales/for_tryton' | ||||
|         self._create_sale() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user