def test_incognito_mode_false_by_default(self): my_class = HttpSdk() self.assertFalse(my_class.incognito_mode)
def send_http_request(context, method): safe_add_http_request_context_to_behave_context(context) context.http_request_context.method = method context.api_response = HttpSdk.http_request_from_context( context.http_request_context) context.http_request_context.clear()
def test_set_default_proxy_without_scheme(self): default_proxy = HttpSdk.DEFAULT_PROXY HttpSdk.set_default_proxy("localhost:1234") self.assertEqual(HttpSdk.DEFAULT_PROXY, "http://localhost:1234") HttpSdk.set_default_proxy(default_proxy) self.assertEqual(HttpSdk.DEFAULT_PROXY, default_proxy)
def test_set_default_host_none(self): default_host = HttpSdk.DEFAULT_HOST HttpSdk.set_default_host(None) self.assertEqual(HttpSdk.DEFAULT_HOST, default_host)
def test_set_default_host_without_scheme(self): default_host = HttpSdk.DEFAULT_HOST HttpSdk.set_default_host("localhost:1234") self.assertEqual(HttpSdk.DEFAULT_HOST, "http://localhost:1234") HttpSdk.set_default_host(default_host) self.assertEqual(HttpSdk.DEFAULT_HOST, default_host)