12
12
13
13
class HttpResponseFromRequestsLibTestCase (unittest .TestCase ):
14
14
def test_from_empty_response (self ):
15
+ # pylint: disable=protected-access
15
16
requests_response = requests_lib .Response ()
16
17
requests_response .status_code = int (HTTPStatus .OK )
17
18
requests_response ._content = b""
@@ -23,6 +24,7 @@ def test_from_empty_response(self):
23
24
self .assertEqual ({}, response .headers )
24
25
25
26
def test_from_plain_text_response (self ):
27
+ # pylint: disable=protected-access
26
28
requests_response = requests_lib .Response ()
27
29
requests_response .status_code = int (HTTPStatus .OK )
28
30
requests_response .headers .update ({"content-type" : "text/plain" })
@@ -35,6 +37,7 @@ def test_from_plain_text_response(self):
35
37
self .assertEqual ({"content-type" : "text/plain" }, response .headers )
36
38
37
39
def test_from_json_response (self ):
40
+ # pylint: disable=protected-access
38
41
test_content = {"foo" : ["bar" , 12345 ], "baz" : True }
39
42
requests_response = requests_lib .Response ()
40
43
requests_response .status_code = int (HTTPStatus .OK )
@@ -48,6 +51,7 @@ def test_from_json_response(self):
48
51
self .assertEqual ({"content-type" : "application/json" }, response .headers )
49
52
50
53
def test_from_error_json_response (self ):
54
+ # pylint: disable=protected-access
51
55
test_content = {"error" : "Internal server error" }
52
56
requests_response = requests_lib .Response ()
53
57
requests_response .status_code = int (HTTPStatus .INTERNAL_SERVER_ERROR )
0 commit comments