summaryrefslogtreecommitdiff
path: root/odoo/addons/test_documentation_examples/tests/test_delegation.py
diff options
context:
space:
mode:
authorVictor Feyens <vfe@odoo.com>2021-04-29 15:23:09 +0000
committerAntoine Vandevenne (anv) <anv@odoo.com>2021-05-04 08:09:47 +0000
commit565f6f7d6ffee5b2808eaa4d52abe5f48150747d (patch)
treeb1bf31d71085a83f4ea933f4ce02f8728acef41d /odoo/addons/test_documentation_examples/tests/test_delegation.py
parent27bad8c3e32049ec69a588df0558e57a0b928309 (diff)
[REM] core: remove `test_documentation_examples` module
The only purpose of the module `test_documentation_examples` is to test a few of the code examples shown in the developer documentation. As de86b3fb79e removes the documentation sources from the repository, the test module is removed as well. DOC PR: https://github.com/odoo/documentation-user/pull/945 task-2352371 closes odoo/odoo#70178 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com> Co-authored-by: Victor Feyens <vfe@odoo.com> Co-authored-by: Antoine Vandevenne <anv@odoo.com>
Diffstat (limited to 'odoo/addons/test_documentation_examples/tests/test_delegation.py')
-rw-r--r--odoo/addons/test_documentation_examples/tests/test_delegation.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/odoo/addons/test_documentation_examples/tests/test_delegation.py b/odoo/addons/test_documentation_examples/tests/test_delegation.py
deleted file mode 100644
index 27bf288ceb1..00000000000
--- a/odoo/addons/test_documentation_examples/tests/test_delegation.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- coding: utf-8 -*-
-# Part of Odoo. See LICENSE file for full copyright and licensing details.
-
-from odoo.tests import common
-
-class TestDelegation(common.TransactionCase):
-
- def setUp(self):
- super(TestDelegation, self).setUp()
- env = self.env
- record = env['delegation.laptop'].create({
- 'screen_id': env['delegation.screen'].create({'size': 13.0}).id,
- 'keyboard_id': env['delegation.keyboard'].create({'layout': 'QWERTY'}).id,
- })
- self.record = record
-
- def test_delegating_record(self):
- env = self.env
- record = self.record
-
- # children fields can be looked up on the parent record directly
- self.assertEqual(
- record.size
- ,
- 13.0
- )
- self.assertEqual(
- record.layout
- ,
- 'QWERTY'
- )
-
- def test_swap_child(self):
- env = self.env
- record = self.record
-
- record.write({
- 'screen_id': env['delegation.screen'].create({'size': 17.0}).id
- })
- self.assertEqual(record.size, 17.0)
-
- def test_write(self):
- record = self.record
-
- record.write({'size': 14.0})
- self.assertEqual(record.size, 14.0)
- self.assertEqual(record.screen_id.size, 14.0)