<s> from nose . tools import eq_ as assertEqual <EOL> from cloudify . decorators import operation <EOL> from cloudify import context <EOL> from cloudify import ctx <EOL> from testenv . utils import update_storage <EOL> @ operation <EOL> def setup ( source , target , ** _ ) : <EOL> ctx . source . instance . runtime_properties . update ( source ) <EOL> ctx . target . instance . runtime_properties . update ( target ) <EOL> @ operation <EOL> def assertion ( a = None , b = None , c = None , d = None , ** _ ) : <EOL> if ctx . type == context . NODE_INSTANCE : <EOL> assertEqual ( a , '<STR_LIT>' ) <EOL> assertEqual ( b , '<STR_LIT>' ) <EOL> assertEqual ( c , None ) <EOL> assertEqual ( d , None ) <EOL> else : <EOL> assertEqual ( a , None ) <EOL> assertEqual ( b , None ) <EOL> assertEqual ( c , '<STR_LIT>' ) <EOL> assertEqual ( d , '<STR_LIT>' ) <EOL> with update_storage ( ctx ) as data : <EOL> invocations = data . get ( '<STR_LIT>' , [ ] ) <EOL> data [ '<STR_LIT>' ] = invocations <EOL> invocations . append ( ctx . type ) </s>
