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

« back to all changes in this revision

Viewing changes to heat/tests/common.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-10-03 09:43:04 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20131003094304-k2c4qcsfn7cv6eos
Tags: 2013.2~rc1-0ubuntu1
* New upstream release.
* debian/control: Dropped python-d2to1 build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from oslo.config import cfg
24
24
 
25
25
import heat.engine.scheduler as scheduler
 
26
from heat.engine import environment
 
27
from heat.engine import resources
26
28
 
27
29
 
28
30
class HeatTestCase(testtools.TestCase):
45
47
                               'environment.d')
46
48
 
47
49
        cfg.CONF.set_default('environment_dir', env_dir)
 
50
        self.addCleanup(cfg.CONF.reset)
 
51
 
 
52
        tri = resources.global_env().get_resource_info(
 
53
            'AWS::RDS::DBInstance',
 
54
            registry_type=environment.TemplateResourceInfo)
 
55
        if tri is not None:
 
56
            cur_path = tri.template_name
 
57
            templ_path = os.path.join(project_dir, 'etc', 'heat', 'templates')
 
58
            if templ_path not in cur_path:
 
59
                tri.template_name = cur_path.replace('/etc/heat/templates',
 
60
                                                     templ_path)