Add tox support

This commit is contained in:
James Page 2015-10-31 08:30:09 +09:00
parent a747b8ff79
commit 442a9f35c9
4 changed files with 7 additions and 10 deletions

View File

@ -1,4 +1,5 @@
revision
bin
.coverage
.testrepository
.tox
tags

View File

@ -323,7 +323,7 @@ class JujuCA(object):
@property
def ca_key_path(self):
return os.path.join(self.ca_dir, 'private', 'cacert.key')
return os.path.join(self.ca_dir, 'private', 'cacert.key')
@property
def root_ca_cert_path(self):
@ -331,7 +331,7 @@ class JujuCA(object):
@property
def root_ca_key_path(self):
return os.path.join(self.root_ca_dir, 'private', 'cacert.key')
return os.path.join(self.root_ca_dir, 'private', 'cacert.key')
def get_ca_bundle(self):
int_cert = open(self.ca_cert_path).read()

View File

@ -372,7 +372,7 @@ def save_script_rc():
def do_openstack_upgrade_reexec(configs):
do_openstack_upgrade(configs)
log("Re-execing hook to pickup upgraded packages", level=INFO)
log("Re-execing hook to pickup upgraded packages", level=INFO)
os.execl('./hooks/config-changed-postupgrade', '')

View File

@ -1,11 +1,7 @@
from mock import patch
with patch('charmhelpers.core.hookenv.config') as config:
config.return_value = 'keystone'
import keystone_utils as utils # noqa
with patch('keystone_utils.register_configs') as register_configs:
import git_reinstall
with patch('hooks.keystone_utils.register_configs') as register_configs:
import git_reinstall
from test_utils import (
CharmTestCase