Module ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad NameLoad Dict decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str With Call AttributeLoad NameLoad attr Str Str Str body With Call AttributeLoad NameLoad attr NameLoad Str NameStore body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad Call NameLoad Str Call NameLoad Call AttributeLoad Str attr NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr Str Str Str keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Str With Call AttributeLoad NameLoad attr Str Str Str body With Call AttributeLoad NameLoad attr NameLoad Str NameStore body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad Call NameLoad Str Call NameLoad Call AttributeLoad Str attr NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr NameLoad keyword NameLoad keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Str With Call AttributeLoad NameLoad attr Str body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad Call NameLoad Str decorator_list NameLoad decorator_list
N/A mock patch call nose.tools istest provy.more.centos HostNameRole provy.more.centos.utils hostname tests.unit.tools.helpers ProvyTestCase HostNameRoleTest N/A ProvyTestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super HostNameRoleTest self setUp N/A N/A self role N/A HostNameRole None N/A N/A ensures_a_hostname_is_configured_when_not_existing N/A N/A self N/A N/A N/A new_hostname new-hostname N/A N/A N/A self mock_role_methods read_remote_file execute ensure_line N/A N/A N/A N/A patch object hostname sed sed N/A N/A N/A N/A N/A self role execute return_value previous-hostname N/A N/A N/A N/A self role read_remote_file return_value N/A N/A 
            some config
            HOSTNAME={}
            some other config
             format new_hostname N/A result N/A N/A N/A self role ensure_hostname new_hostname N/A N/A N/A self assertTrue result N/A N/A N/A N/A N/A self role read_remote_file assert_called_once_with /etc/sysconfig/network N/A N/A N/A self assertEqual N/A N/A N/A self role execute mock_calls N/A N/A call hostname N/A call N/A N/A hostname "{}" format new_hostname sudo True stdout False N/A N/A N/A self assertFalse N/A N/A N/A self role ensure_line called N/A N/A N/A sed assert_called_once_with /etc/sysconfig/network HOSTNAME=.* HOSTNAME=new-hostname use_sudo True N/A istest ensures_a_hostname_is_configured_when_another_one_already_exists N/A N/A self N/A N/A N/A new_hostname new-hostname N/A N/A N/A self mock_role_methods read_remote_file execute ensure_line N/A N/A N/A N/A patch object hostname sed sed N/A N/A N/A N/A N/A self role execute return_value previous-hostname N/A N/A N/A N/A self role read_remote_file return_value N/A N/A 
            some config
            some other config
             format new_hostname N/A result N/A N/A N/A self role ensure_hostname new_hostname N/A N/A N/A self assertTrue result N/A N/A N/A N/A N/A self role read_remote_file assert_called_once_with /etc/sysconfig/network N/A N/A N/A self assertEqual N/A N/A N/A self role execute mock_calls N/A N/A call hostname N/A call N/A N/A hostname "{}" format new_hostname sudo True stdout False N/A N/A N/A self assertFalse N/A sed called N/A N/A N/A N/A N/A self role ensure_line assert_called_once_with N/A N/A HOSTNAME={} format new_hostname sudo True stdout False N/A istest doesnt_configure_the_hostname_if_same_as_server N/A N/A self N/A N/A N/A new_hostname new-hostname N/A N/A N/A self mock_role_methods execute N/A N/A N/A N/A N/A self role execute return_value new_hostname N/A result N/A N/A N/A self role ensure_hostname new_hostname N/A N/A N/A self assertFalse result N/A N/A N/A self assertEqual N/A N/A N/A self role execute mock_calls N/A N/A call hostname N/A istest N/A