def test_member_role_exists(self, mock_stackrc_exists, mock_auth_values,
                             mock_ksdiscover):
     mock_stackrc_exists.return_value = True
     self._mock_ksclient_roles(mock_auth_values, mock_ksdiscover, ['admin'])
     instack_env = {}
     undercloud._member_role_exists(instack_env)
     self.assertEqual({'MEMBER_ROLE_EXISTS': 'False'}, instack_env)
 def test_member_role_exists_true(self, mock_stackrc_exists,
                                  mock_auth_values, mock_ksdiscover):
     mock_stackrc_exists.return_value = True
     self._mock_ksclient_roles(mock_auth_values, mock_ksdiscover,
                               ['admin', '_member_'])
     instack_env = {}
     undercloud._member_role_exists(instack_env)
     self.assertEqual({'MEMBER_ROLE_EXISTS': 'True'}, instack_env)
 def test_member_role_exists_nostackrc(self, mock_stackrc_exists):
     mock_stackrc_exists.return_value = False
     instack_env = {}
     undercloud._member_role_exists(instack_env)
     self.assertEqual({'MEMBER_ROLE_EXISTS': 'False'}, instack_env)
 def test_member_role_exists_nostackrc(self, mock_stackrc_exists):
     mock_stackrc_exists.return_value = False
     instack_env = {}
     undercloud._member_role_exists(instack_env)
     self.assertEqual({'MEMBER_ROLE_EXISTS': 'False'}, instack_env)