summaryrefslogtreecommitdiffstats
path: root/charms/trusty/keepalived/unit_tests/test_actions.py
blob: 5105ab440a26cec2ebe5dd746e88d6a575defdc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python

import sys
import mock
import unittest
from pkg_resources import resource_filename

# allow importing actions from the hooks directory
sys.path.append(resource_filename(__name__, '../hooks'))
import actions


class TestActions(unittest.TestCase):
    @mock.patch('charmhelpers.core.hookenv.log')
    def test_log_start(self, log):
        actions.log_start('test-service')
        log.assert_called_once_with('keepalived starting')


if __name__ == '__main__':
    unittest.main()