diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-02-24 16:09:42 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-02-24 16:09:42 -0500 |
commit | 4770c61cf1a114348c763094c4cfd3d007894b0d (patch) | |
tree | 45b97f203471fc9a5c48e6cb0722822aab9f327e /tests/unittests/test_udprocess.py | |
parent | 9170dbcd6432ec7aa5d27882f0bb1d29957fc409 (diff) | |
download | vyos-cloud-init-4770c61cf1a114348c763094c4cfd3d007894b0d.tar.gz vyos-cloud-init-4770c61cf1a114348c763094c4cfd3d007894b0d.zip |
move recently added test_udprocess tests to test_data, improve a bit
explicitly test compressed user-data.
Diffstat (limited to 'tests/unittests/test_udprocess.py')
-rw-r--r-- | tests/unittests/test_udprocess.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/unittests/test_udprocess.py b/tests/unittests/test_udprocess.py deleted file mode 100644 index 39adbf9d..00000000 --- a/tests/unittests/test_udprocess.py +++ /dev/null @@ -1,30 +0,0 @@ -from . import helpers - -from six.moves import filterfalse - -from cloudinit import user_data as ud -from cloudinit import util - -def count_messages(root): - am = 0 - for m in root.walk(): - if ud.is_skippable(m): - continue - am += 1 - return am - - -class TestUDProcess(helpers.ResourceUsingTestCase): - - def testBytesInPayload(self): - msg = b'#cloud-config\napt_update: True\n' - ud_proc = ud.UserDataProcessor(self.getCloudPaths()) - message = ud_proc.process(msg) - self.assertTrue(count_messages(message) == 1) - - def testStringInPayload(self): - msg = '#cloud-config\napt_update: True\n' - - ud_proc = ud.UserDataProcessor(self.getCloudPaths()) - message = ud_proc.process(msg) - self.assertTrue(count_messages(message) == 1) |