Improve test coverage of nova.privsep.utils.
Trivial, but makes testing coverage for this file complete. Change-Id: Ie3a7ac393a558e450fba5f51b05ffae7f73a32a4
This commit is contained in:
parent
fc3890667e
commit
8d71c615f2
|
@ -18,6 +18,7 @@ import os
|
|||
|
||||
import nova.privsep.utils
|
||||
from nova import test
|
||||
from nova.tests import fixtures
|
||||
|
||||
|
||||
class SupportDirectIOTestCase(test.NoDBTestCase):
|
||||
|
@ -125,3 +126,14 @@ class SupportDirectIOTestCase(test.NoDBTestCase):
|
|||
self.mock_write.assert_not_called()
|
||||
self.mock_close.assert_not_called()
|
||||
self.mock_unlink.assert_called_once_with(self.test_path)
|
||||
|
||||
|
||||
class UtilsTestCase(test.NoDBTestCase):
|
||||
def setUp(self):
|
||||
super(UtilsTestCase, self).setUp()
|
||||
self.useFixture(fixtures.PrivsepFixture())
|
||||
|
||||
@mock.patch('os.kill')
|
||||
def test_kill(self, mock_kill):
|
||||
nova.privsep.utils.kill(42, -9)
|
||||
mock_kill.assert_called_with(42, -9)
|
||||
|
|
Loading…
Reference in New Issue