Skip to main content

Odoo Test Helper

Project description

License: AGPL-3 https://badge.fury.io/py/odoo-test-helper.svg

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

History

This module is inspired of the following mixin code that can be found in OCA and shopinvader repository

Intial Authors are

Refactor/extraction have been done by

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

https://github.com/shopinvader/odoo-shopinvader/pull/607

Changes

0.0.1

  • add fake module loader

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odoo-test-helper-1.0.0.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

odoo_test_helper-1.0.0-py2.py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page