def test_stored_context_err(self):
    'Test stored_context error path.'
    self.stack = stack.Stack(self.ctx, 'creds_stack', self.tmpl)
    ex = self.assertRaises(exception.Error, self.stack.stored_context)
    expected_err = 'Attempt to use stored_context with no user_creds'
    self.assertEqual(expected_err, str(ex))
Test stored_context error path.
def test_stored_context_err(self):
    
    self.stack = stack.Stack(self.ctx, 'creds_stack', self.tmpl)
    ex = self.assertRaises(exception.Error, self.stack.stored_context)
    expected_err = 'Attempt to use stored_context with no user_creds'
    self.assertEqual(expected_err, str(ex))