Odoo Test Helper
Project description
odoo-test-helper is toolbox for writing odoo test
Loading Fake models
Sometime you build an abstract module that can be use by many modules. In such case, if you want to test it with real records you need to register real models.
One solution is to create a module_test module with a little implementation that use your abstract model.
One other solution is define test only models and load them in tests. This lib makes this possible and easy.
Example
There is an example of test here:
This example load the class ResPartner from the file:
Real implementation case can be found in the following module
Contributor
Sébastien BEAU <sebastien.beau@akretion.com>
Laurent Mignon <laurent.mignon@acsone.eu>
Simone Orsi <simone.orsi@camptocamp.com>
History
This module is inspired of the following mixin code that can be found in OCA and shopinvader repository
Mixin in Shopinvader: https://github.com/shopinvader/odoo-shopinvader/blob/b81b921ea52c911e5b33afac88adb8f9a1c02626/base_url/tests/models_mixin.py
Intial Authors are
Laurent Mignon <laurent.mignon@acsone.eu>
Simone Orsi <simone.orsi@camptocamp.com>
Refactor/extraction have been done by
Sébastien BEAU <sebastien.beau@akretion.com>
This refactor try to load all class correctly like Odoo does with the exact same syntax
Note this refactor/extraction have been done to fix the test of the following issue
Changes
0.0.1
add fake module loader
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file odoo-test-helper-1.0.0.tar.gz
.
File metadata
- Download URL: odoo-test-helper-1.0.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f24af62bce33f7dc19048e294c89a8e9d7ad113fef2730d13135b7f61cbbf1c |
|
MD5 | 4d0e18ea63e7b8c1bc9cfea978698167 |
|
BLAKE2b-256 | ef6a530dd1b5dd6e4effc694ed4959cc57bfec3e1aeb5e3dd8ccb29e42023c2d |
File details
Details for the file odoo_test_helper-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: odoo_test_helper-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc081069da0681d42f8a5c8bd27ede1fbd442825b57704d058fe8a37a4fc3fd8 |
|
MD5 | 20f55445c3bb7c30c9108dd8ab57d1cb |
|
BLAKE2b-256 | 0a00d210f1d4b1b711ed77736c82f5a6f14ad344e66e5604d15293728b982192 |