diff --git a/alb-s3-sqs-es/tests/test_message.py b/alb-s3-sqs-es/tests/test_message.py index fc8e890..9e12e3f 100644 --- a/alb-s3-sqs-es/tests/test_message.py +++ b/alb-s3-sqs-es/tests/test_message.py @@ -17,8 +17,15 @@ def test_app_loadbalancer_log_https_useragent(loadbalancer_https_entry): msg = loadbalancer_https_entry.payload() assert msg['type'] == 'https' - assert msg['user_agent'].startswith('Mozilla/5.0 (Macintosh;') - assert msg['user_agent_details']['browser'] == 'Firefox 88.0' - assert msg['user_agent_details']['os'] == 'Mac OS X 10.15' - assert msg['user_agent_details']['device'] == 'PC' + assert msg['user_agent_details']['user_agent'].startswith('Mozilla/5.0 (Macintosh;') + assert msg['user_agent_details']['browser'] == 'Firefox' + assert msg['user_agent_details']['browser_version'] == '88.0' + assert msg['user_agent_details']['os'] == 'Mac OS X' + assert msg['user_agent_details']['os_version'] == '10.15' + assert msg['user_agent_details']['device_family'] == 'Generic Feature Phone' + assert msg['user_agent_details']['device_brand'] == 'Generic' + assert msg['user_agent_details']['device_model'] == 'Feature Phone' + assert msg['user_agent_details']['is_pc'] is True assert msg['user_agent_details']['is_bot'] is False + assert msg['user_agent_details']['is_tablet'] is False + assert msg['user_agent_details']['is_mobile'] is True