diff options
| author | harlowja <harlowja@virtualbox.rhel> | 2013-02-21 22:51:02 -0800 |
|---|---|---|
| committer | harlowja <harlowja@virtualbox.rhel> | 2013-02-21 22:51:02 -0800 |
| commit | 575a084808db7d5ac607a848b018abe676e73a91 (patch) | |
| tree | 34e179b0623074e6cd6fc03e4b3db001f8e493bf /tests/unittests/test_builtin_handlers.py | |
| parent | 9dfb60d3144860334ab1ad1d72920d962139461f (diff) | |
| parent | d4886b65549c886499141872a9928412a74bbea2 (diff) | |
| download | vyos-cloud-init-575a084808db7d5ac607a848b018abe676e73a91.tar.gz vyos-cloud-init-575a084808db7d5ac607a848b018abe676e73a91.zip | |
Update to code on trunk.
Diffstat (limited to 'tests/unittests/test_builtin_handlers.py')
| -rw-r--r-- | tests/unittests/test_builtin_handlers.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/unittests/test_builtin_handlers.py b/tests/unittests/test_builtin_handlers.py index ebc0bd51..5f41cb3d 100644 --- a/tests/unittests/test_builtin_handlers.py +++ b/tests/unittests/test_builtin_handlers.py @@ -6,6 +6,7 @@ from mocker import MockerTestCase from cloudinit import handlers from cloudinit import helpers +from cloudinit import util from cloudinit.handlers import upstart_job @@ -34,6 +35,7 @@ class TestBuiltins(MockerTestCase): self.assertEquals(0, len(os.listdir(up_root))) def test_upstart_frequency_single(self): + # files should be written out when frequency is ! per-instance c_root = self.makeDir() up_root = self.makeDir() paths = helpers.Paths({ @@ -41,9 +43,12 @@ class TestBuiltins(MockerTestCase): 'upstart_dir': up_root, }) freq = PER_INSTANCE + + mock_subp = self.mocker.replace(util.subp, passthrough=False) + mock_subp(["initctl", "reload-configuration"], capture=False) + self.mocker.replay() + h = upstart_job.UpstartJobPartHandler(paths) - # No files should be written out when - # the frequency is ! per-instance h.handle_part('', handlers.CONTENT_START, None, None, None) h.handle_part('blah', 'text/upstart-job', |
