django(View): add purchase summary json endpoint.
This commit is contained in:
		| @@ -32,3 +32,10 @@ class TestSummaryViewPurchase(TestCase): | ||||
|         self.assertEqual(response.status_code, 200) | ||||
|         self.assertEqual(response.context["purchase"].customer, self.purchase.customer) | ||||
|         self.assertIn('Alejo Mono', response.content.decode('utf-8')) | ||||
|  | ||||
|     def test_json_summary(self): | ||||
|         response = self.client.get(f"/don_confiao/resumen_compra_json/{self.purchase.id}") | ||||
|         self.assertEqual(response.status_code, 200) | ||||
|         self.assertIn('Alejo Mono', response.content.decode('utf-8')) | ||||
|         self.assertIn('cafe', response.content.decode('utf-8')) | ||||
|         self.assertIn('72500', response.content.decode('utf-8')) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user