Debian Codegraph @

addons/auth_totp_portal/tests/test_tour.py

raw
1 import logging
2
3 from odoo.addons.auth_totp.tests.test_totp import TestTOTPMixin
4 from odoo.addons.base.tests.common import HttpCaseWithUserPortal
5 from odoo.tests import tagged
6
7 _logger = logging.getLogger(__name__)
8
9
10 @tagged('post_install', '-at_install')
11 class TestTOTPortal(HttpCaseWithUserPortal, TestTOTPMixin):
12 """
13 Largely replicates TestTOTP
14 """
15 def test_totp(self):
16 self.install_totphook()
17
18 self.start_tour('/my/security', 'totportal_tour_setup', login='portal')
19 # also disables totp otherwise we can't re-login
20 self.start_tour('/', 'totportal_login_enabled', login=None)
21 self.start_tour('/', 'totportal_login_disabled', login=None)