def test_stack_name_invalid(self):
    gt_255_chars = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv'
    stack_names = ['_foo', '1bad', '.kcats', 'test stack', ' teststack', '^-^', '"stack"', '1234', 'cat|dog', '$(foo)', 'test/stack', 'test\\stack', 'test::stack', 'test;stack', 'test~stack', '#test', gt_255_chars]
    for stack_name in stack_names:
        ex = self.assertRaises(exception.StackValidationFailed, stack.Stack, self.ctx, stack_name, self.tmpl)
        self.assertIn(('Invalid stack name %s must contain' % stack_name), str(ex))
def test_stack_name_invalid(self):
    gt_255_chars = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv'
    stack_names = ['_foo', '1bad', '.kcats', 'test stack', ' teststack', '^-^', '"stack"', '1234', 'cat|dog', '$(foo)', 'test/stack', 'test\\stack', 'test::stack', 'test;stack', 'test~stack', '#test', gt_255_chars]
    for stack_name in stack_names:
        ex = self.assertRaises(exception.StackValidationFailed, stack.Stack, self.ctx, stack_name, self.tmpl)
        self.assertIn(('Invalid stack name %s must contain' % stack_name), str(ex))