@@ -41,9 +41,9 @@ def test_capabilities(self):
4141 def test_info (self ):
4242 info = self .service .info
4343 keys = ["build" , "cpu_arch" , "guid" , "isFree" , "isTrial" , "licenseKeys" ,
44- "licenseSignature" , "licenseState" , "master_guid" , "mode" ,
44+ "licenseSignature" , "licenseState" , "master_guid" , "mode" ,
4545 "os_build" , "os_name" , "os_version" , "serverName" , "version" ]
46- for key in keys :
46+ for key in keys :
4747 self .assertTrue (key in list (info .keys ()))
4848
4949 def test_info_with_namespace (self ):
@@ -141,11 +141,11 @@ def test_splunk_version(self):
141141 for version in [(4 ,3 ,3 ), (5 ,), (5 ,0 ,1 )]:
142142 with self .fake_splunk_version (version ):
143143 self .assertEqual (version , self .service .splunk_version )
144-
144+
145145 def test_query_without_login_raises_auth_error (self ):
146146 service = self ._create_unauthenticated_service ()
147147 self .assertRaises (AuthenticationError , lambda : service .indexes .list ())
148-
148+
149149 # This behavior is needed for backward compatibility for code
150150 # prior to the introduction of AuthenticationError
151151 def test_query_without_login_raises_http_401 (self ):
@@ -181,11 +181,11 @@ def assertIsNotNone(self, obj, msg=None):
181181
182182 def test_login_and_store_cookie (self ):
183183 self .assertIsNotNone (self .service .get_cookies ())
184- self .assertEquals (len (self .service .get_cookies ()), 0 )
184+ self .assertEqual (len (self .service .get_cookies ()), 0 )
185185 self .service .login ()
186186 self .assertIsNotNone (self .service .get_cookies ())
187187 self .assertNotEquals (self .service .get_cookies (), {})
188- self .assertEquals (len (self .service .get_cookies ()), 1 )
188+ self .assertEqual (len (self .service .get_cookies ()), 1 )
189189
190190 def test_login_with_cookie (self ):
191191 self .service .login ()
@@ -202,10 +202,10 @@ def test_login_with_cookie(self):
202202 def test_login_fails_with_bad_cookie (self ):
203203 bad_cookie = {'bad' : 'cookie' }
204204 service2 = client .Service ()
205- self .assertEquals (len (service2 .get_cookies ()), 0 )
205+ self .assertEqual (len (service2 .get_cookies ()), 0 )
206206 service2 .get_cookies ().update (bad_cookie )
207207 service2 .login ()
208- self .assertEquals (service2 .get_cookies (), {'bad' : 'cookie' })
208+ self .assertEqual (service2 .get_cookies (), {'bad' : 'cookie' })
209209
210210 # Should get an error with a bad cookie
211211 try :
@@ -228,7 +228,7 @@ def test_autologin_with_cookie(self):
228228
229229 def test_login_fails_with_no_cookie (self ):
230230 service2 = client .Service ()
231- self .assertEquals (len (service2 .get_cookies ()), 0 )
231+ self .assertEqual (len (service2 .get_cookies ()), 0 )
232232
233233 # Should get an error when no authentication method
234234 try :
@@ -330,25 +330,25 @@ def test_trailing_with_n_args_works(self):
330330class TestEntityNamespacing (testlib .SDKTestCase ):
331331 def test_proper_namespace_with_arguments (self ):
332332 entity = self .service .apps ['search' ]
333- self .assertEquals ((None ,None ,"global" ), entity ._proper_namespace (sharing = "global" ))
334- self .assertEquals ((None ,"search" ,"app" ), entity ._proper_namespace (sharing = "app" , app = "search" ))
335- self .assertEquals (
333+ self .assertEqual ((None ,None ,"global" ), entity ._proper_namespace (sharing = "global" ))
334+ self .assertEqual ((None ,"search" ,"app" ), entity ._proper_namespace (sharing = "app" , app = "search" ))
335+ self .assertEqual (
336336 ("admin" , "search" , "user" ),
337337 entity ._proper_namespace (sharing = "user" , app = "search" , owner = "admin" )
338338 )
339339
340340 def test_proper_namespace_with_entity_namespace (self ):
341341 entity = self .service .apps ['search' ]
342342 namespace = (entity .access .owner , entity .access .app , entity .access .sharing )
343- self .assertEquals (namespace , entity ._proper_namespace ())
343+ self .assertEqual (namespace , entity ._proper_namespace ())
344344
345345 def test_proper_namespace_with_service_namespace (self ):
346346 entity = client .Entity (self .service , client .PATH_APPS + "search" )
347347 del entity ._state ['access' ]
348348 namespace = (self .service .namespace .owner ,
349349 self .service .namespace .app ,
350350 self .service .namespace .sharing )
351- self .assertEquals (namespace , entity ._proper_namespace ())
351+ self .assertEqual (namespace , entity ._proper_namespace ())
352352
353353if __name__ == "__main__" :
354354 try :
0 commit comments