~ubuntu-branches/ubuntu/trusty/heat/trusty

« back to all changes in this revision

Viewing changes to heat/tests/test_watch.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandelman
  • Date: 2013-09-08 21:51:19 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130908215119-r939tu4aumqgdrkx
Tags: 2013.2~b3-0ubuntu1
[ Chuck Short ]
* New upstream release.
* debian/control: Add python-netaddr as build-dep.
* debian/heat-common.install: Remove heat-boto and associated man-page
* debian/heat-common.install: Remove heat-cfn and associated man-page
* debian/heat-common.install: Remove heat-watch and associated man-page
* debian/patches/fix-sqlalchemy-0.8.patch: Dropped

[ Adam Gandelman ]
* debian/patches/default-kombu.patch: Dropped.
* debian/patches/default-sqlite.patch: Refreshed.
* debian/*.install, rules: Install heat.conf.sample as common
  config file in heat-common. Drop other per-package configs, they
  are no longer used.
* debian/rules: Clean pbr .egg from build dir if it exists.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from heat.engine import parser
24
24
from heat.tests.common import HeatTestCase
25
25
from heat.tests import utils
26
 
from heat.tests.utils import dummy_context
27
26
 
28
27
 
29
28
class WatchData(object):
47
46
        # Create a dummy stack in the DB as WatchRule instances
48
47
        # must be associated with a stack
49
48
        utils.setup_dummy_db()
50
 
        ctx = dummy_context()
 
49
        ctx = utils.dummy_context()
51
50
        ctx.auth_token = 'abcd1234'
52
51
        empty_tmpl = {"template": {}}
53
52
        tmpl = parser.Template(empty_tmpl)
64
63
        self.setUpDatabase()
65
64
        self.username = 'watchrule_test_user'
66
65
 
67
 
        self.ctx = dummy_context()
 
66
        self.ctx = utils.dummy_context()
68
67
        self.ctx.auth_token = 'abcd1234'
69
68
 
70
69
        self.m.ReplayAll()
76
75
 
77
76
        if action_expected:
78
77
            dummy_action = DummyAction()
79
 
            self.m.StubOutWithMock(parser.Stack, '__getitem__')
80
 
            parser.Stack.__getitem__(mox.IgnoreArg()
81
 
                                     ).MultipleTimes().AndReturn(dummy_action)
 
78
            self.m.StubOutWithMock(parser.Stack, 'resource_by_refid')
 
79
            parser.Stack.resource_by_refid(mox.IgnoreArg()).\
 
80
                MultipleTimes().AndReturn(dummy_action)
82
81
 
83
82
        self.m.ReplayAll()
84
83