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!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden