1616 version ,
1717 InvalidCredentialFormat ,
1818 Hosts ,
19- Detects
2019 )
2120from falconpy ._util import confirm_base_region , confirm_base_url
2221from falconpy ._version import _TITLE , _VERSION
@@ -51,12 +50,12 @@ def serviceAny_TestBadCredRevoke(self):
5150 return False
5251
5352 def serviceAny_TestStaleObjectAuth (self ):
54- falcon = Detects (auth_object = OAuth2 (creds = {"client_id" : auth .config ["falcon_client_id" ],
53+ falcon = Hosts (auth_object = OAuth2 (creds = {"client_id" : auth .config ["falcon_client_id" ],
5554 "client_secret" : auth .config ["falcon_client_secret" ]
5655 },
5756 base_url = "us-1" , # Testing dashed base specifier
5857 debug = _DEBUG ))
59- result = falcon .QueryDetects ()
58+ result = falcon .QueryDevicesByFilterScroll ()
6059 if result ["status_code" ] in AllowedResponses :
6160 return True
6261 else :
@@ -142,12 +141,12 @@ def serviceAny_forceGovCloudAutoSelectFailure(self):
142141 }
143142 result = falcon .command ("oauth2AccessToken" , data = t_creds , base_url = "usgov1" )
144143 if result ["status_code" ] == 201 :
145- falcon = Detects (client_id = os .environ ["CROSS_DEBUG_KEY" ],
146- client_secret = os .environ ["CROSS_DEBUG_SECRET" ],
147- base_url = "usgov1" ,
148- renew_window = 300 ,
149- debug = _DEBUG
150- )
144+ falcon = Hosts (client_id = os .environ ["CROSS_DEBUG_KEY" ],
145+ client_secret = os .environ ["CROSS_DEBUG_SECRET" ],
146+ base_url = "usgov1" ,
147+ renew_window = 300 ,
148+ debug = _DEBUG
149+ )
151150 result = falcon .auth_object .token ()
152151 if result ["status_code" ] == 429 :
153152 pytest .skip ("Rate limit hit" )
@@ -169,8 +168,8 @@ def serviceAny_TestObjectAuth(self):
169168 )
170169 auth_obj .token ()
171170 # While we're at it, test user_agent override
172- falcon = Detects (auth_object = auth_obj , user_agent = f"{ _TITLE } /{ str (_VERSION )} " , debug = _DEBUG )
173- result = falcon .QueryDetects ()
171+ falcon = Hosts (auth_object = auth_obj , user_agent = f"{ _TITLE } /{ str (_VERSION )} " , debug = _DEBUG )
172+ result = falcon .QueryDevicesByFilterScroll ()
174173 if result ["status_code" ] not in AllowedResponses :
175174 _returned = False
176175 # And test the new built in logout functionality
@@ -202,8 +201,8 @@ def serviceAny_TestObjectAuth(self):
202201
203202 def serviceAny_TestBadObjectAuth (self ):
204203 # Should also test bad direct auth in the authentication class
205- falcon = Detects (auth_object = OAuth2 (debug = _DEBUG ))
206- result = falcon .QueryDetects ()
204+ falcon = Hosts (auth_object = OAuth2 (debug = _DEBUG ))
205+ result = falcon .QueryDevicesByFilterScroll ()
207206 if result ["status_code" ] in AllowedResponses :
208207 return True
209208 else :
@@ -217,8 +216,8 @@ def serviceAny_TestEasyObjectAuth(self):
217216 # auth_obj.token()
218217 # Test passing just the service class object, not the auth_object attribute
219218 # Service Class base object should detect and handle this.
220- falcon = Detects (auth_object = auth_obj )
221- result = falcon .QueryDetects ()
219+ falcon = Hosts (auth_object = auth_obj )
220+ result = falcon .QueryDevicesByFilterScroll ()
222221 if result ["status_code" ] in AllowedResponses :
223222 return True
224223 else :
0 commit comments