#NEWLINE# def test_get_colorvalue( self ) : #NEWLINE# #INDENT# g = { #NEWLINE# #INDENT# 'txhash' : 'blah' , #NEWLINE# 'height' : 1 , #NEWLINE# 'outindex' : 0 , #NEWLINE# #UNINDENT# } #NEWLINE# cid0 = list ( self . colorset0 . color_id_set ) [ 0 ] #NEWLINE# cdef0 = OBColorDefinition ( cid0 , g ) #NEWLINE# cid1 = list ( self . colorset1 . color_id_set ) [ 0 ] #NEWLINE# cdef1 = OBColorDefinition ( cid1 , g ) #NEWLINE# cid2 = list ( self . colorset2 . color_id_set ) [ 0 ] #NEWLINE# cdef2 = OBColorDefinition ( cid2 , g ) #NEWLINE# cv0 = SimpleColorValue ( colordef = cdef0 , value = 1 ) #NEWLINE# cv1 = SimpleColorValue ( colordef = cdef1 , value = 2 ) #NEWLINE# cv2 = SimpleColorValue ( colordef = cdef2 , value = 3 ) #NEWLINE# utxo = MockUTXO ( [ cv0 , cv1 , cv2 ] ) #NEWLINE# self . assertEquals ( self . asset0 . get_colorvalue ( utxo ) , cv0 ) #NEWLINE# self . assertEquals ( self . asset1 . get_colorvalue ( utxo ) , cv1 ) #NEWLINE# self . assertEquals ( self . asset2 . get_colorvalue ( utxo ) , cv2 ) #NEWLINE# utxo = MockUTXO ( [ cv0 , cv2 ] ) #NEWLINE# self . assertRaises ( Exception , self . asset1 . get_colorvalue , utxo )