Use current module to configure send_sms testing method

When tests are discovered module can be imported from a different path, so we
must ensure to configure the same method so the global variable sms_queue is
the same.

issue9215
This commit is contained in:
Cédric Krier
2022-04-18 19:30:20 +02:00
parent c9b04eb4c0
commit 3ce77bd0bd
+1 -1
View File
@@ -32,7 +32,7 @@ class AuthenticationSMSTestCase(ModuleTestCase):
config.add_section('authentication_sms')
config.set(
'authentication_sms', 'function',
'trytond.modules.authentication_sms.tests.send_sms')
'.'.join([send_sms.__module__, send_sms.__qualname__]))
self.addCleanup(config.remove_section, 'authentication_sms')
del sms_queue[:]