[FIX] survey: using a f-string without interpolated variables (W1309)

closes odoo/odoo#86332

Related: odoo/enterprise#25232
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
Victor Feyens
2022-04-27 07:51:25 +02:00
parent d6d3493c13
commit f6f4ed7bc9
+4 -4
View File
@@ -342,20 +342,20 @@ class TestSurveySecurityControllers(common.TestSurveyCommon, HttpCase):
})
# right short access token
response = self.url_open(f'/s/123456')
response = self.url_open('/s/123456')
self.assertEqual(response.status_code, 200)
self.assertIn('The session will begin automatically when the host starts', response.text)
# `like` operator injection
response = self.url_open(f'/s/______')
response = self.url_open('/s/______')
self.assertFalse(self.survey.title in response.text)
# right short token, but closed survey
self.survey.action_archive()
response = self.url_open(f'/s/123456')
response = self.url_open('/s/123456')
self.assertFalse(self.survey.title in response.text)
# right short token, but wrong `session_state`
self.survey.write({'session_state': False, 'active': True})
response = self.url_open(f'/s/123456')
response = self.url_open('/s/123456')
self.assertFalse(self.survey.title in response.text)