~anton-skriptsov/charms/trusty/cinder-nexentaedge/trunk

« back to all changes in this revision

Viewing changes to unit_tests/test_actions.py

  • Committer: anton.skriptsov at nexenta
  • Date: 2015-11-12 19:21:10 UTC
  • Revision ID: anton.skriptsov@nexenta.com-20151112192110-y49mpvnvf3pp3xk1
initial

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
import sys
 
4
import mock
 
5
import unittest
 
6
from pkg_resources import resource_filename
 
7
 
 
8
# allow importing actions from the hooks directory
 
9
sys.path.append(resource_filename(__name__, '../hooks'))
 
10
import actions
 
11
 
 
12
 
 
13
class TestActions(unittest.TestCase):
 
14
    @mock.patch('charmhelpers.core.hookenv.log')
 
15
    def test_log_start(self, log):
 
16
        actions.log_start('test-service')
 
17
        log.assert_called_once_with('nedge-node starting')
 
18
 
 
19
 
 
20
if __name__ == '__main__':
 
21
    unittest.main()