Skip to content

Commit 511ea29

Browse files
[MIG] server_environment_autocreate: Migration to 18.0
1 parent a2df872 commit 511ea29

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

server_environment_autocreate/__manifest__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
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
}

server_environment_autocreate/tests/test_server_environment_autocreate.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,22 @@
1919
# Test need to be run post install otherwise the _register_hook is not called yet
2020
@tagged("post_install", "-at_install")
2121
class 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):

0 commit comments

Comments
 (0)