Odoo18-Base/odoo/addons/test_http/tests/test_security.py

18 lines
634 B
Python
Raw Permalink Normal View History

2025-01-06 10:57:38 +07:00
import json
from .test_common import TestHttpBase
class TestHttpSecurity(TestHttpBase):
def test_httprequest_attrs(self):
res = self.db_url_open('/test_http/httprequest_attrs')
result = json.loads(res.content)
self.assertNotIn('user_agent_class', result)
self.assertNotIn('parameter_storage_class', result)
def test_httprequest_environ(self):
res = self.db_url_open('/test_http/httprequest_environ')
result = json.loads(res.content)
self.assertNotIn('wsgi.input', result)
self.assertNotIn('werkzeug.socket', result)
self.assertNotIn('socket', result)