2
2
import unittest
3
3
4
4
from python_http_client .client import Client
5
- from python_http_client .exceptions import (BadRequestsError , HTTPError ,
6
- NotFoundError ,
7
- ServiceUnavailableError ,
8
- UnsupportedMediaTypeError ,
9
- handle_error )
5
+ from python_http_client .exceptions import (
6
+ BadRequestsError , HTTPError ,
7
+ NotFoundError ,
8
+ ServiceUnavailableError ,
9
+ UnsupportedMediaTypeError ,
10
+ handle_error
11
+ )
10
12
11
13
try :
12
14
# Python 3
@@ -80,7 +82,7 @@ def test__init__(self):
80
82
self .assertEqual (default_client .host , self .host )
81
83
self .assertEqual (default_client .request_headers , {})
82
84
self .assertIs (default_client .timeout , None )
83
- methods = [ 'delete' , 'get' , 'patch' , 'post' , 'put' ]
85
+ methods = { 'delete' , 'get' , 'patch' , 'post' , 'put' }
84
86
self .assertEqual (default_client .methods , methods )
85
87
self .assertIsNone (default_client ._version )
86
88
self .assertEqual (default_client ._url_path , [])
@@ -93,7 +95,7 @@ def test__init__(self):
93
95
timeout = 10 )
94
96
self .assertEqual (client .host , self .host )
95
97
self .assertEqual (client .request_headers , request_headers )
96
- methods = [ 'delete' , 'get' , 'patch' , 'post' , 'put' ]
98
+ methods = { 'delete' , 'get' , 'patch' , 'post' , 'put' }
97
99
self .assertEqual (client .methods , methods )
98
100
self .assertEqual (client ._version , 3 )
99
101
self .assertEqual (client ._url_path , [])
@@ -160,7 +162,7 @@ def test__getattr__(self):
160
162
self .assertEqual (client ._version , 3 )
161
163
162
164
# Test GET
163
- mock_client ._url_path + ['test' ]
165
+ mock_client ._url_path += ['test' ]
164
166
r = mock_client .get ()
165
167
self .assertEqual (r .status_code , 200 )
166
168
0 commit comments