\r\n

51Degrees Device Detection Python  4.4

Device Detection services for 51Degrees Pipeline

tests.test_devicedetection.DeviceDetectionTests Class Reference

Inheritance diagram for tests.test_devicedetection.DeviceDetectionTests:

[legend]

Collaboration diagram for tests.test_devicedetection.DeviceDetectionTests:

[legend]

Public Member Functions

def  test_pipeline_builder_shareusage_init (self)
Tests whether the device detection pipeline builder adds the usage sharing engine when initialised with a datafile. More...
def  test_on_premise_engine_datafile (self)
Tests whether a datafile (for the update service) is added when auto_update is set. More...
def  test_properties_onpremise (self)
Tests whether a properties list is created on the on premise engine. More...
def  test_evidencekey_filter_onpremise (self)
Tests whether the on premise evidence key filter works. More...
def  test_basic_get_onpremise (self)
Check property lookup works. More...
def  test_process_with_no_evidence (self)
Process a FlowData which does not have any evidence. More...
def  test_process_with_empty_user_agent (self)
Process a FlowData with an empty user agent. More...
def  test_process_with_no_headers (self)
Process a FlowData with no headers. More...
def  test_process_with_no_useful_headers (self)
Process a FlowData with no useful headers. More...
def  test_case_insensitive_evidence_keys (self)
Process a FlowData with case insensitive evidence keys. More...
def  test_missing_property_service_not_found_anywhere (self)
Trigger the missing property service by requesting a property not available in any datafile. More...
def  test_missing_property_service_not_found_in_current (self)
Trigger the missing property service by requesting a property not available in the current datafile. More...
def  test_excluded_property (self)
Test error if accessing property that has been restricted. More...
def  test_evidencekey_filter_contains_user_agent (self)
Test if evidence key filter with header.user-agent. More...
def  test_evidencekey_filter_contains_device_stock_ua (self)
Test if evidence key filter with header.device-stock-ua. More...
def  test_evidencekey_filter_contains_query_params (self)
Test if evidence key filter with query.user-agent query.device-stock-ua. More...
def  test_evidencekey_filter_case_insensitive_keys (self)
Test evidence key filter with case insensitive keys. More...
def  test_evidencekey_filter_overrides (self)
Test evidence key filter with overrides in cookies and query string. More...
def  test_profile_overrides (self)
Test profile overrides. More...
def  test_profile_overrides_no_headers (self)
Test profile overrides no headers. More...
def  test_profile_overrides_deviceid (self)
Test profile overrides with device ids. More...
def  test_device_id (self)
Test profile overrides with device ids. More...
def  test_build_from_config (self)
def  test_no_element_exists (self)
Access flow element that doesn't exist in pipeline. More...
def  test_has_value_false (self)
Test aspect property value returns false for has value. More...
def  test_matched_user_agents (self)
Test aspect property value returns false for has value. More...
def  test_value_types (self)
Test type is returned correctly for property. More...
def  test_available_properties (self)
Test properties that come back from getProperties actually exist in engine. More...
def  test_engine_init_performance (self)
Test how long it takes for the engine to be initialised by looking at the metadata dictionary created on init. More...
def  test_validate_data_true (self)
Validate whether has_value returns correctly with valid evidence. More...
def  test_validate_data_false (self)
Validate whether has_value returns correctly with invalid evidence. More...
def  test_engine_reload (self)
Refresh the engine. More...
def  process_user_agent_list (self, pipeline)

Member Function Documentation

◆ process_user_agent_list()

def tests.test_devicedetection.DeviceDetectionTests.process_user_agent_list (   self,
  pipeline  
)

◆ test_available_properties()

def tests.test_devicedetection.DeviceDetectionTests.test_available_properties (   self )

Test properties that come back from getProperties actually exist in engine.

◆ test_basic_get_onpremise()

def tests.test_devicedetection.DeviceDetectionTests.test_basic_get_onpremise (   self )

Check property lookup works.

◆ test_build_from_config()

def tests.test_devicedetection.DeviceDetectionTests.test_build_from_config (   self )

◆ test_case_insensitive_evidence_keys()

def tests.test_devicedetection.DeviceDetectionTests.test_case_insensitive_evidence_keys (   self )

Process a FlowData with case insensitive evidence keys.

◆ test_device_id()

def tests.test_devicedetection.DeviceDetectionTests.test_device_id (   self )

Test profile overrides with device ids.

◆ test_engine_init_performance()

def tests.test_devicedetection.DeviceDetectionTests.test_engine_init_performance (   self )

Test how long it takes for the engine to be initialised by looking at the metadata dictionary created on init.

◆ test_engine_reload()

def tests.test_devicedetection.DeviceDetectionTests.test_engine_reload (   self )

Refresh the engine.

◆ test_evidencekey_filter_case_insensitive_keys()

def tests.test_devicedetection.DeviceDetectionTests.test_evidencekey_filter_case_insensitive_keys (   self )

Test evidence key filter with case insensitive keys.

◆ test_evidencekey_filter_contains_device_stock_ua()

def tests.test_devicedetection.DeviceDetectionTests.test_evidencekey_filter_contains_device_stock_ua (   self )

Test if evidence key filter with header.device-stock-ua.

◆ test_evidencekey_filter_contains_query_params()

def tests.test_devicedetection.DeviceDetectionTests.test_evidencekey_filter_contains_query_params (   self )

Test if evidence key filter with query.user-agent query.device-stock-ua.

◆ test_evidencekey_filter_contains_user_agent()

def tests.test_devicedetection.DeviceDetectionTests.test_evidencekey_filter_contains_user_agent (   self )

Test if evidence key filter with header.user-agent.

◆ test_evidencekey_filter_onpremise()

def tests.test_devicedetection.DeviceDetectionTests.test_evidencekey_filter_onpremise (   self )

Tests whether the on premise evidence key filter works.

◆ test_evidencekey_filter_overrides()

def tests.test_devicedetection.DeviceDetectionTests.test_evidencekey_filter_overrides (   self )

Test evidence key filter with overrides in cookies and query string.

◆ test_excluded_property()

def tests.test_devicedetection.DeviceDetectionTests.test_excluded_property (   self )

Test error if accessing property that has been restricted.

◆ test_has_value_false()

def tests.test_devicedetection.DeviceDetectionTests.test_has_value_false (   self )

Test aspect property value returns false for has value.

◆ test_matched_user_agents()

def tests.test_devicedetection.DeviceDetectionTests.test_matched_user_agents (   self )

Test aspect property value returns false for has value.

◆ test_missing_property_service_not_found_anywhere()

def tests.test_devicedetection.DeviceDetectionTests.test_missing_property_service_not_found_anywhere (   self )

Trigger the missing property service by requesting a property not available in any datafile.

◆ test_missing_property_service_not_found_in_current()

def tests.test_devicedetection.DeviceDetectionTests.test_missing_property_service_not_found_in_current (   self )

Trigger the missing property service by requesting a property not available in the current datafile.

◆ test_no_element_exists()

def tests.test_devicedetection.DeviceDetectionTests.test_no_element_exists (   self )

Access flow element that doesn't exist in pipeline.

◆ test_on_premise_engine_datafile()

def tests.test_devicedetection.DeviceDetectionTests.test_on_premise_engine_datafile (   self )

Tests whether a datafile (for the update service) is added when auto_update is set.

◆ test_pipeline_builder_shareusage_init()

def tests.test_devicedetection.DeviceDetectionTests.test_pipeline_builder_shareusage_init (   self )

Tests whether the device detection pipeline builder adds the usage sharing engine when initialised with a datafile.

◆ test_process_with_empty_user_agent()

def tests.test_devicedetection.DeviceDetectionTests.test_process_with_empty_user_agent (   self )

Process a FlowData with an empty user agent.

◆ test_process_with_no_evidence()

def tests.test_devicedetection.DeviceDetectionTests.test_process_with_no_evidence (   self )

Process a FlowData which does not have any evidence.

This should not throw an error and all 51Degrees engines should set the default aspect properties

◆ test_process_with_no_headers()

def tests.test_devicedetection.DeviceDetectionTests.test_process_with_no_headers (   self )

Process a FlowData with no headers.

◆ test_process_with_no_useful_headers()

def tests.test_devicedetection.DeviceDetectionTests.test_process_with_no_useful_headers (   self )

Process a FlowData with no useful headers.

◆ test_profile_overrides()

def tests.test_devicedetection.DeviceDetectionTests.test_profile_overrides (   self )

Test profile overrides.

◆ test_profile_overrides_deviceid()

def tests.test_devicedetection.DeviceDetectionTests.test_profile_overrides_deviceid (   self )

Test profile overrides with device ids.

◆ test_profile_overrides_no_headers()

def tests.test_devicedetection.DeviceDetectionTests.test_profile_overrides_no_headers (   self )

Test profile overrides no headers.

◆ test_properties_onpremise()

def tests.test_devicedetection.DeviceDetectionTests.test_properties_onpremise (   self )

Tests whether a properties list is created on the on premise engine.

◆ test_validate_data_false()

def tests.test_devicedetection.DeviceDetectionTests.test_validate_data_false (   self )

Validate whether has_value returns correctly with invalid evidence.

◆ test_validate_data_true()

def tests.test_devicedetection.DeviceDetectionTests.test_validate_data_true (   self )

Validate whether has_value returns correctly with valid evidence.

◆ test_value_types()

def tests.test_devicedetection.DeviceDetectionTests.test_value_types (   self )

Test type is returned correctly for property.