File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,10 @@ class ResponseHeadersWithVersion:
51
51
headers = {"API-Version" : "1.999" }
52
52
ok = True
53
53
54
- @patch ("requests.get" , return_value = ResponseHeadersWithVersion ())
54
+ @patch (
55
+ "pynetbox.core.query.requests.sessions.Session.get" ,
56
+ return_value = ResponseHeadersWithVersion (),
57
+ )
55
58
def test_api_version (self , * _ ):
56
59
api = pynetbox .api (host ,)
57
60
self .assertEqual (api .version , "1.999" )
@@ -60,7 +63,10 @@ class ResponseHeadersWithoutVersion:
60
63
headers = {}
61
64
ok = True
62
65
63
- @patch ("requests.get" , return_value = ResponseHeadersWithoutVersion ())
66
+ @patch (
67
+ "pynetbox.core.query.requests.sessions.Session.get" ,
68
+ return_value = ResponseHeadersWithoutVersion (),
69
+ )
64
70
def test_api_version_not_found (self , * _ ):
65
71
api = pynetbox .api (host ,)
66
72
self .assertEqual (api .version , "" )
You can’t perform that action at this time.
0 commit comments