first commit
This commit is contained in:
		
							
								
								
									
										0
									
								
								modules/sale_don_confiao/tests/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								modules/sale_don_confiao/tests/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										20
									
								
								modules/sale_don_confiao/tests/scenario_don_confiao.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								modules/sale_don_confiao/tests/scenario_don_confiao.rst
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| ===================== | ||||
| Don Confiao Scenario | ||||
| ===================== | ||||
|  | ||||
|  | ||||
| Imports:: | ||||
|   >>> from proteus import Model | ||||
|   >>> from trytond.tests.tools import activate_modules | ||||
|  | ||||
|  | ||||
| Activate module:: | ||||
|   >>> config = activate_modules('sale_don_confiao') | ||||
|  | ||||
| Initial data:: | ||||
|   >>> Party = Model.get('party.party') | ||||
|  | ||||
| Create party:: | ||||
|   >>> customer = Party() | ||||
|   >>> customer.name = 'Dunkan' | ||||
|   >>> customer.save() | ||||
							
								
								
									
										43
									
								
								modules/sale_don_confiao/tests/test_api_donconfiao.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								modules/sale_don_confiao/tests/test_api_donconfiao.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| from trytond.tests.test_routes import RoutesTestCase | ||||
| from trytond.tests.test_tryton import Client | ||||
| from trytond.protocols.wrappers import Response | ||||
| from trytond.pool import Pool | ||||
| from trytond.wsgi import app | ||||
|  | ||||
| from http import HTTPStatus | ||||
|  | ||||
| import uuid | ||||
|  | ||||
|  | ||||
| class DonConfiaoApiRouteTestCase( | ||||
|         RoutesTestCase): | ||||
|     "Speco API Routes" | ||||
|  | ||||
|     module = 'sale_don_confiao' | ||||
|  | ||||
|     key = uuid.uuid4().hex | ||||
|  | ||||
|     @classmethod | ||||
|     def setUpDatabase(cls): | ||||
|         pool = Pool() | ||||
|         Application = pool.get('res.user.application') | ||||
|         Application( | ||||
|             key=cls.key, | ||||
|             user=1, | ||||
|             application='sale_don_confiao', | ||||
|             state='validated').save() | ||||
|  | ||||
|     def test_get_parties(self): | ||||
|         client = Client(app, Response) | ||||
|         response = client.get( | ||||
|             '/parties', | ||||
|             headers={ | ||||
|                 'Authorization': f'bearer {self.key}', | ||||
|             }) | ||||
|         self.assertEqual(response.status_code, HTTPStatus.OK) | ||||
|         # response = client.get( | ||||
|         #     '/parties', | ||||
|         #     headers={ | ||||
|         #         'Authorization': f'bearer {self.key}', | ||||
|         #     }) | ||||
|         # self.assertEqual(response.status_code, HTTPStatus.OK) | ||||
							
								
								
									
										10
									
								
								modules/sale_don_confiao/tests/test_module.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								modules/sale_don_confiao/tests/test_module.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
|  | ||||
| from trytond.tests.test_tryton import ModuleTestCase | ||||
|  | ||||
|  | ||||
| class SaleDonConfiaoTestCase(ModuleTestCase): | ||||
|     "Test Sale Don Confiao module" | ||||
|     module = 'sale_don_confiao' | ||||
|  | ||||
|  | ||||
| del ModuleTestCase | ||||
							
								
								
									
										8
									
								
								modules/sale_don_confiao/tests/test_scenario.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								modules/sale_don_confiao/tests/test_scenario.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| # This file is part of Tryton.  The COPYRIGHT file at the top level of | ||||
| # this repository contains the full copyright notices and license terms. | ||||
|  | ||||
| from trytond.tests.test_tryton import load_doc_tests | ||||
|  | ||||
|  | ||||
| def load_tests(*args, **kwargs): | ||||
|     return load_doc_tests(__name__, __file__, *args, **kwargs) | ||||
		Reference in New Issue
	
	Block a user