#NEWLINE# def testWebSphereVariables( cfg ) : #NEWLINE# #INDENT# 'Sets and gets WebSphere Variables.' #NEWLINE# m = 'testWebSphereVariables:' #NEWLINE# sop ( m , 'Entry.' ) #NEWLINE# setWebSphereVariable ( 'WSADMINLIB_TEST_VARIABLE' , 'myTestContent' , cfg [ 'nodeName' ] ) #NEWLINE# testString = 'Test[${WSADMINLIB_TEST_VARIABLE}]String' #NEWLINE# targetString = 'Test[myTestContent]String' #NEWLINE# replacedString = expandWebSphereVariables ( testString , cfg [ 'nodeName' ] ) #NEWLINE# if ( targetString != replacedString ) : #NEWLINE# #INDENT# errbrk ( m , ( 'String was not replaced as expected. replacedString=%s' % repr ( replacedString ) ) ) #NEWLINE# #UNINDENT# removeWebSphereVariable ( 'WSADMINLIB_TEST_VARIABLE' , targetString [ 'nodeName' ] ) #NEWLINE# sop ( m , 'Exit. Success.' )