There is an example repository with an addon and all the scripts mentioned here: https://github.com/JSilversun/odoo-testing-example
If you are an odoo developer, you probably would like to write some unit tests like regular pytest/unit test suites so you can debug, get coverage reports and enhance your own developer experience.
So, how can we achieve it?
Well, let’s start by using a docker-compose file to get our odoo and database running:
--dev allargs will allow your odoo instance to restart once it detects changes on your addons or related volumes code.
Building a landing page was one of my 2021 resolutions, however, I usually get caught up working too much on different projects and I never find the time to do things for myself, it’s time to be different, time to do what you promise, and give that step to actually move forward to achieve your goals.
During this guide you will have a playground available to understand how to build and maintain a GraphQL API using Hasura, it’s recommended that you are familiar with what is GraphQL and its advantages over REST since this is a practical guide, you can learn the basics about GraphQL in this tutorial.
The code is available in this Github repository.
Before starting this tutorial, make sure you have installed and understand the basics of:
In this guide, you will learn how to get started with
pytest. Before we start you should be already familiar with unitary tests and why they are important. The goal of this article is to show you how to set up
pytest and why should you use it.
Now, let’s begin. Unit tests are pieces of code that allows you to test the smallest parts of your application like modules, classes, components, etc.