#NEWLINE# def test_signature_algorithm( self ) : #NEWLINE# #INDENT# cases = [ ( { #NEWLINE# #INDENT# 'command' : 'listVirtualMachines' , #NEWLINE# #UNINDENT# } , 'z/a9Y7J52u48VpqIgiwaGUMCso0=' ) , ( { #NEWLINE# #INDENT# 'command' : 'deployVirtualMachine' , #NEWLINE# 'name' : 'fred' , #NEWLINE# 'displayname' : 'George' , #NEWLINE# 'serviceofferingid' : 5 , #NEWLINE# 'templateid' : 17 , #NEWLINE# 'zoneid' : 23 , #NEWLINE# 'networkids' : 42 , #NEWLINE# #UNINDENT# } , 'gHTo7mYmadZ+zluKHzlEKb1i/QU=' ) , ( { #NEWLINE# #INDENT# 'command' : 'deployVirtualMachine' , #NEWLINE# 'name' : 'fred' , #NEWLINE# 'displayname' : 'George+Ringo' , #NEWLINE# 'serviceofferingid' : 5 , #NEWLINE# 'templateid' : 17 , #NEWLINE# 'zoneid' : 23 , #NEWLINE# 'networkids' : 42 , #NEWLINE# #UNINDENT# } , 'tAgfrreI1ZvWlWLClD3gu4+aKv4=' ) ] #NEWLINE# connection = CloudStackConnection ( 'fnord' , 'abracadabra' ) #NEWLINE# for case in connection : #NEWLINE# #INDENT# params = connection . add_default_params ( case [ 0 ] ) #NEWLINE# self . assertEqual ( connection . _make_signature ( params ) , b ( case [ 1 ] ) )