I would like to import the mock-library in odoo testing environment. I use
import unittest.mock
but when using @mock.patch I get a NameError: name 'mock' is not defined.
What's the problem?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I would like to import the mock-library in odoo testing environment. I use
import unittest.mock
but when using @mock.patch I get a NameError: name 'mock' is not defined.
What's the problem?
yes, you can use it. unittest is part of a standard python.
I think your import statement is incorrect
use @patch
That's it! Thanks!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
Registrieren