@@ -1310,17 +1310,15 @@ def test_zero_is_not_none(self):
13101310
13111311 # Should not be filtered out
13121312 result = self .sg .find_one ( 'Asset' , [['id' ,'is' ,self .asset ['id' ]],[num_field , 'is_not' , None ]] ,[num_field ] )
1313- self .assertIsNotNone (result )
1313+ self .assertFalse (result == None )
13141314
13151315
13161316 # Set it to some other number
13171317 self .sg .update ( 'Asset' , self .asset ['id' ], { num_field : 1 })
13181318
13191319 # Should not be filtered out
13201320 result = self .sg .find_one ( 'Asset' , [['id' ,'is' ,self .asset ['id' ]],[num_field , 'is_not' , None ]] ,[num_field ] )
1321- self .assertIsNotNone (result )
1322-
1323-
1321+ self .assertFalse (result == None )
13241322
13251323
13261324class TestFollow (base .LiveTestBase ):
@@ -1439,7 +1437,16 @@ def test_human_user_sudo_auth_fails(self):
14391437 password = self .config .human_password ,
14401438 http_proxy = self .config .http_proxy ,
14411439 sudo_as_login = "blah" )
1442- self .assertRaisesRegexp (shotgun_api3 .Fault , "does not have permission to 'sudo'" , x .find_one , 'Shot' , [])
1440+ self .assertRaises (shotgun_api3 .Fault , x .find_one , 'Shot' , [])
1441+ try :
1442+ x .find_one ('Shot' ,[])
1443+ except shotgun_api3 .Fault , e :
1444+ # py24 exceptions don't have message attr
1445+ if hasattr (e , 'message' ):
1446+ self .assertEquals ("The user does not have permission to 'sudo': " , e .message )
1447+ else :
1448+ self .assertEquals ("The user does not have permission to 'sudo': " , e .args [0 ])
1449+
14431450
14441451
14451452class TestHumanUserAuth (base .HumanUserAuthLiveTestBase ):
0 commit comments