File tree Expand file tree Collapse file tree
server_environment_autocreate Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44{
55 "name" : "Server Environment Autocreate" ,
66 "summary" : """Add ability to auto create records""" ,
7- "version" : "17 .0.1.0.0" ,
7+ "version" : "18 .0.1.0.0" ,
88 "license" : "LGPL-3" ,
99 "author" : "XCG Consulting,Odoo Community Association (OCA)" ,
1010 "depends" : ["server_environment" ],
1111 "development_status" : "Beta" ,
1212 "category" : "Tools" ,
1313 "website" : "https://github.com/OCA/server-env" ,
14+ "external_dependencies" : {
15+ "python" : [
16+ "odoo-test-helper" ,
17+ ],
18+ },
1419}
Original file line number Diff line number Diff line change 1919# Test need to be run post install otherwise the _register_hook is not called yet
2020@tagged ("post_install" , "-at_install" )
2121class TestEnv (common .ServerEnvironmentCase ):
22- @classmethod
23- def setUpClass (cls ):
24- super ().setUpClass ()
22+ def setUp (self ):
23+ super ().setUp ()
2524 # Load fake models ->/
26- cls .loader = FakeModelLoader (cls .env , cls .__module__ )
27- cls .loader .backup_registry ()
25+ self .loader = FakeModelLoader (self .env , self .__module__ )
26+ self .loader .backup_registry ()
27+
2828 from .models import ExternalService , ExternalService2
2929
30- cls .loader .update_registry ((ExternalService , ExternalService2 ))
31- cls .env ["external_service" ].create ([{"name" : "ftp2" , "description" : "another" }])
30+ self .loader .update_registry ((ExternalService , ExternalService2 ))
31+ self .env ["external_service" ].create (
32+ [{"name" : "ftp2" , "description" : "another" }]
33+ )
3234
33- @classmethod
34- def tearDownClass (cls ):
35- cls .loader .restore_registry ()
36- super ().tearDownClass ()
35+ def tearDown (self ):
36+ self .loader .restore_registry ()
37+ super ().tearDown ()
3738
3839 @patch .dict (config .options , {"running_env" : "autocreate" })
3940 def test_autocreate (self ):
You can’t perform that action at this time.
0 commit comments