<s> from basetest import BaseToscaTest <EOL> from core . models import Node , Site , Deployment , SiteDeployment <EOL> class NodeTest ( BaseToscaTest ) : <EOL> tests = [ "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] <EOL> def cleanup ( self ) : <EOL> self . try_to_delete ( Node , name = "<STR_LIT>" ) <EOL> self . try_to_delete ( Site , name = "<STR_LIT>" ) <EOL> self . try_to_delete ( Deployment , name = "<STR_LIT>" ) <EOL> def get_base_templates ( self ) : <EOL> return """<STR_LIT>""" <EOL> def create_node_minimal ( self ) : <EOL> self . assert_noobj ( Node , "<STR_LIT>" ) <EOL> self . execute ( self . get_base_templates ( ) + <EOL> self . make_nodetemplate ( "<STR_LIT>" , "<STR_LIT>" , <EOL> reqs = [ ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) ] ) ) <EOL> node = self . assert_obj ( Node , "<STR_LIT>" ) <EOL> assert ( node . site_deployment is not None ) <EOL> assert ( node . site is not None ) <EOL> def create_node_nocreate ( self ) : <EOL> self . assert_noobj ( Node , "<STR_LIT>" ) <EOL> self . execute ( self . get_base_templates ( ) + <EOL> self . make_nodetemplate ( "<STR_LIT>" , "<STR_LIT>" , <EOL> reqs = [ ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) ] , <EOL> props = { "<STR_LIT>" : True } ) ) <EOL> self . assert_noobj ( Node , "<STR_LIT>" ) <EOL> def destroy_node ( self ) : <EOL> self . assert_noobj ( Node , "<STR_LIT>" ) <EOL> self . execute ( self . get_base_templates ( ) + <EOL> self . make_nodetemplate ( "<STR_LIT>" , "<STR_LIT>" , <EOL> reqs = [ ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) ] ) ) <EOL> self . assert_obj ( Node , "<STR_LIT>" ) <EOL> self . destroy ( self . get_base_templates ( ) + <EOL> self . make_nodetemplate ( "<STR_LIT>" , "<STR_LIT>" , <EOL> reqs = [ ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) ] ) ) <EOL> self . assert_noobj ( Node , "<STR_LIT>" ) <EOL> def destroy_node_nodelete ( self ) : <EOL> self . assert_noobj ( Node , "<STR_LIT>" ) <EOL> self . execute ( self . get_base_templates ( ) + <EOL> self . make_nodetemplate ( "<STR_LIT>" , "<STR_LIT>" , <EOL> reqs = [ ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) ] ) ) <EOL> self . assert_obj ( Node , "<STR_LIT>" ) <EOL> self . destroy ( self . get_base_templates ( ) + <EOL> self . make_nodetemplate ( "<STR_LIT>" , "<STR_LIT>" , <EOL> reqs = [ ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) ] , <EOL> props = { "<STR_LIT>" : True } ) ) <EOL> self . assert_obj ( Node , "<STR_LIT>" ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> NodeTest ( ) </s>
