\r\n

51Degrees Pipeline Python  4.4

51Degrees Pipeline for Python

tests.test_cloudrequestengine.TestCloudRequestEngine Class Reference

Detailed Description

Test cloud request engine adds correct information to post request following the order of precedence when processing evidence and returns the response in the ElementData.

Evidence parameters should be added in descending order of precedence.

Inheritance diagram for tests.test_cloudrequestengine.TestCloudRequestEngine:

[legend]

Collaboration diagram for tests.test_cloudrequestengine.TestCloudRequestEngine:

[legend]

Public Member Functions

def  setUp (self)
def  testConfigEndPoint_ExplicitSetting (self)
Check that the explicitly setting the cloud endpoint via method interface take precedence over everything else. More...
def  testConfigEndPoint_EnvironmentVariableSetting (self)
Check that the setting the cloud endpoint via environment variable take precedence over the default value. More...
def  testConfigEndPoint_DefaultSetting (self)
Check that if nothing else is set the default value should be used. More...
def  test_evidence_precedence (self, warn, evidence1, evidence2)
Test cloud request engine adds correct information to post request following the order of precedence when processing evidence and returns the response in the ElementData. More...
def  test_get_selected_evidence (self, evidence, ev_type, expected_value)
Test evidence of specific type is returned from all the evidence passed, if type is not from query, header or cookie then evidences are returned sorted in descensing order. More...
def  test_get_content (self, evidence, expected_value)
Test Content to send in the POST request is generated as per the precedence rule of The evidence keys. More...
def  test_no_exception_on_cloud_request_engine_init (self)
def  test_exception_on_server_down_without_suppression (self)
def  test_no_exception_on_server_down_with_suppression (self)

Static Public Attributes

string  testResourceKey = "resource_key"
string  testEndPoint = "http://testEndPoint/" string  testEnvVarEndPoint = "http://testEnvVarEndPoint/"

Member Function Documentation

◆ setUp()

def tests.test_cloudrequestengine.TestCloudRequestEngine.setUp (   self )

◆ test_evidence_precedence()

def tests.test_cloudrequestengine.TestCloudRequestEngine.test_evidence_precedence (   self,
  warn,
  evidence1,
  evidence2  
)

Test cloud request engine adds correct information to post request following the order of precedence when processing evidence and returns the response in the ElementData.

Evidence parameters should be added in descending order of precedence.

◆ test_exception_on_server_down_without_suppression()

def tests.test_cloudrequestengine.TestCloudRequestEngine.test_exception_on_server_down_without_suppression (   self )

◆ test_get_content()

def tests.test_cloudrequestengine.TestCloudRequestEngine.test_get_content (   self,
  evidence,
  expected_value  
)

Test Content to send in the POST request is generated as per the precedence rule of The evidence keys.

These are added to the evidence in reverse order, if there is conflict then the queryData value is overwritten.

◆ test_get_selected_evidence()

def tests.test_cloudrequestengine.TestCloudRequestEngine.test_get_selected_evidence (   self,
  evidence,
  ev_type,
  expected_value  
)

Test evidence of specific type is returned from all the evidence passed, if type is not from query, header or cookie then evidences are returned sorted in descensing order.

◆ test_no_exception_on_cloud_request_engine_init()

def tests.test_cloudrequestengine.TestCloudRequestEngine.test_no_exception_on_cloud_request_engine_init (   self )
Test no exception is thrown when cloud request engine is
initialised and server is down

◆ test_no_exception_on_server_down_with_suppression()

def tests.test_cloudrequestengine.TestCloudRequestEngine.test_no_exception_on_server_down_with_suppression (   self )

◆ testConfigEndPoint_DefaultSetting()

def tests.test_cloudrequestengine.TestCloudRequestEngine.testConfigEndPoint_DefaultSetting (   self )

Check that if nothing else is set the default value should be used.

◆ testConfigEndPoint_EnvironmentVariableSetting()

def tests.test_cloudrequestengine.TestCloudRequestEngine.testConfigEndPoint_EnvironmentVariableSetting (   self )

Check that the setting the cloud endpoint via environment variable take precedence over the default value.

◆ testConfigEndPoint_ExplicitSetting()

def tests.test_cloudrequestengine.TestCloudRequestEngine.testConfigEndPoint_ExplicitSetting (   self )

Check that the explicitly setting the cloud endpoint via method interface take precedence over everything else.

Member Data Documentation

◆ testEndPoint

string tests.test_cloudrequestengine.TestCloudRequestEngine.testEndPoint = "http://testEndPoint/"
static

◆ testEnvVarEndPoint

string tests.test_cloudrequestengine.TestCloudRequestEngine.testEnvVarEndPoint = "http://testEnvVarEndPoint/"
static

◆ testResourceKey

string tests.test_cloudrequestengine.TestCloudRequestEngine.testResourceKey = "resource_key"
static
On This Page