Fix: Products, Categories, Sales, EndPoints
This commit is contained in:
		| @@ -83,6 +83,16 @@ class DonConfiaoApiRouteTestCase( | ||||
|         self.assertEqual(response.status_code, HTTPStatus.OK) | ||||
|         self.assertEqual(len(parties), 2) | ||||
|  | ||||
|     def test_get_categories(self): | ||||
|         client = self.client() | ||||
|         response = client.get( | ||||
|             f'/{self.db_name}/sale_don_confiao/categories', | ||||
|             headers={ | ||||
|                 'Authorization': f'bearer {self.key}', | ||||
|             }) | ||||
|  | ||||
|         self.assertEqual(response.status_code, HTTPStatus.OK) | ||||
|  | ||||
|     def test_get_products(self): | ||||
|         pool = Pool(DB_NAME) | ||||
|         transaction = Transaction().start(DB_NAME, 0, _lock_tables=[ | ||||
| @@ -101,6 +111,8 @@ class DonConfiaoApiRouteTestCase( | ||||
|             template, = ProductTemplate.create([{ | ||||
|                 'name': 'Product', | ||||
|                 'default_uom': Uom.search([('name', '=', 'Unit')])[0].id, | ||||
|                 'sale_uom': Uom.search([('name', '=', 'Unit')])[0].id, | ||||
|                 'salable': True | ||||
|             }]) | ||||
|  | ||||
|             Product.create([{'template': template.id}]) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user