コード例 #1
0
 def test_header_is_traced_false_for_empty_header(self):
     http_config = HttpConfig()
     http_config.trace_headers('some_header')
     assert not http_config.header_is_traced('')
コード例 #2
0
 def test_header_is_traced_case_insensitive(self):
     http_config = HttpConfig()
     http_config.trace_headers('sOmE_hEaDeR')
     assert http_config.header_is_traced('SoMe_HeAdEr')
     assert not http_config.header_is_traced('some_other_header')
コード例 #3
0
 def test_is_header_tracing_configured(self):
     http_config = HttpConfig()
     assert not http_config.is_header_tracing_configured
     http_config.trace_headers('some_header')
     assert http_config.is_header_tracing_configured
コード例 #4
0
 def test_none_entry_do_not_raise_exception(self):
     http_config = HttpConfig()
     http_config.trace_headers(None)
     assert not http_config.header_is_traced('some_header_1')
コード例 #5
0
 def test_trace_multiple_headers(self):
     http_config = HttpConfig()
     http_config.trace_headers(['some_header_1', 'some_header_2'])
     assert http_config.header_is_traced('some_header_1')
     assert http_config.header_is_traced('some_header_2')
     assert not http_config.header_is_traced('some_header_3')
コード例 #6
0
 def test_trace_headers(self):
     http_config = HttpConfig()
     http_config.trace_headers('some_header')
     assert http_config.header_is_traced('some_header')
     assert not http_config.header_is_traced('some_other_header')