#NEWLINE# def test_mixin_schema_mismatch_term( self ) : #NEWLINE# #INDENT# mixins = collections . Counter ( ) #NEWLINE# schemes = collections . defaultdict ( list ) #NEWLINE# mixins [ 'http://example.com/scheme#foo' ] += 1 #NEWLINE# schemes [ 'http://example.com/scheme#' ] . append ( 'foo' ) #NEWLINE# pobj = { #NEWLINE# #INDENT# 'kind' : 'compute' , #NEWLINE# 'category' : 'foo type' , #NEWLINE# 'mixins' : mixins , #NEWLINE# 'schemes' : schemes , #NEWLINE# #UNINDENT# } #NEWLINE# mixin = mock . MagicMock ( ) #NEWLINE# mixin . scheme = 'http://example.com/scheme#' #NEWLINE# mixin . term = 'bar' #NEWLINE# scheme = { #NEWLINE# #INDENT# 'mixins' : [ mixin ] , #NEWLINE# #UNINDENT# } #NEWLINE# v = validator . Validator ( pobj ) #NEWLINE# self . assertRaises ( exception . OCCIMissingType , v . validate , scheme )