~aluria/charms/trusty/collectd/charm-collectd-allinone

« back to all changes in this revision

Viewing changes to unit_tests/test_collectd_hooks.py

  • Committer: Alvaro Uría
  • Date: 2015-12-29 13:46:27 UTC
  • Revision ID: alvaro.uria@canonical.com-20151229134627-kfq0806qjcxo2r31
code from collectd-exporter-prometheus and collectd-openstack integrated; unit_tests extended and passed

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    'register_configs',
35
35
    'restart_map',
36
36
    # charmhelpers.core.hookenv
37
 
    #'config',
 
37
    'config',
38
38
    'is_relation_made',
39
 
    'relation_get',
40
 
    'relation_ids',
 
39
    #'relation_get',
 
40
    #'relation_ids',
41
41
    'relation_set',
42
 
    'related_units',
 
42
    #'related_units',
43
43
    'unit_get',
44
44
    # charmhelpers.core.host
45
45
    'apt_install',
57
57
    def test_correct_install_packages(self):
58
58
        'It installs the correct packages based on what is determined'
59
59
        self.determine_packages.return_value = ['collectd']
 
60
        self.config.return_value = ''
60
61
        hooks.hooks.execute(['hooks/install'])
61
62
        self.apt_install.assert_called_with(['collectd'], fatal=True)