#NEWLINE# def _testContract( self ) : #NEWLINE# #INDENT# validKwargs = { #NEWLINE# #INDENT# 'memberString' : 'Be free! Kill bureaucracy!!!' , #NEWLINE# 'propertyString' : 'Be free! Kill bureaucracy!!!' , #NEWLINE# 'memberStringList' : [ 'a' , 'b' ] , #NEWLINE# 'propertyStringList' : [ 'a' , 'b' ] , #NEWLINE# #UNINDENT# } #NEWLINE# TestContract ( ** validKwargs ) #NEWLINE# self . assertRaises ( ContractNotRespected , TestContract ) #NEWLINE# kwargs = validKwargs . copy ( ) #NEWLINE# kwargs [ 'memberString' ] = 1234 #NEWLINE# self . assertRaises ( ContractNotRespected , TestContract , ** kwargs ) #NEWLINE# kwargs = validKwargs . copy ( ) #NEWLINE# kwargs [ 'propertyString' ] = 1234 #NEWLINE# self . assertRaises ( ContractNotRespected , TestContract , ** kwargs ) #NEWLINE# kwargs = validKwargs . copy ( ) #NEWLINE# kwargs [ 'memberStringList' ] = [ 'a' , 2 ] #NEWLINE# self . assertRaises ( ContractNotRespected , TestContract , ** kwargs ) #NEWLINE# kwargs = validKwargs . copy ( ) #NEWLINE# kwargs [ 'propertyStringList' ] = [ 'a' , 2 ] #NEWLINE# self . assertRaises ( ContractNotRespected , TestContract , ** kwargs ) #NEWLINE# try : #NEWLINE# #INDENT# TestContract ( ) #NEWLINE# #UNINDENT# except ContractNotRespected as e : #NEWLINE# #INDENT# self . assertEqual ( "Expected type 'str', got 'NoneType'.\nchecking: str   for value: Instance of NoneType: None   \nVariables bound in inner context:\n- memberString: Instance of NoneType: None" , str ( self ) )