

def test_can_get_credentials(self):
    self.flags(use_deprecated_auth=True)
    st = {
        'access': 'access',
        'secret': 'secret',
    }
    with user_and_project_generator(self.manager, user_state=st) as (u, p):
        credentials = self.manager.get_environment_rc(u, p)
        LOG.debug(credentials)
        self.assertTrue(('export EC2_ACCESS_KEY="access:testproj"\n' in credentials))
        self.assertTrue(('export EC2_SECRET_KEY="secret"\n' in credentials))

dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/test_auth.py _AuthManagerBaseTestCase.test_can_get_credentials/original