~ubuntu-branches/ubuntu/utopic/heat/utopic-proposed

« back to all changes in this revision

Viewing changes to heat/tests/test_neutron_security_group.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2014-09-08 09:40:59 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20140908094059-pzysrm0uy4senjez
Tags: 2014.2~b3-0ubuntu1
New upstream version. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
from heat.common import template_format
21
21
from heat.engine import parser
22
22
from heat.engine import scheduler
 
23
from heat.engine import template
23
24
from heat.tests.common import HeatTestCase
24
25
from heat.tests import utils
25
26
from heat.tests.v1_1 import fakes
101
102
        self.m.StubOutWithMock(neutronclient.Client, 'delete_security_group')
102
103
        self.m.StubOutWithMock(neutronclient.Client, 'update_security_group')
103
104
 
104
 
    def create_stack(self, template):
105
 
        t = template_format.parse(template)
 
105
    def create_stack(self, templ):
 
106
        t = template_format.parse(templ)
106
107
        self.stack = self.parse_stack(t)
107
108
        self.assertIsNone(self.stack.create())
108
109
        return self.stack
109
110
 
110
111
    def parse_stack(self, t):
111
112
        stack_name = 'test_stack'
112
 
        tmpl = parser.Template(t)
 
113
        tmpl = template.Template(t)
113
114
        stack = parser.Stack(utils.dummy_context(), stack_name, tmpl)
114
115
        stack.store()
115
116
        return stack