diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-08-10 09:06:15 -0600 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-08-10 09:06:15 -0600 |
commit | c3c3dc693c14175e110b5fe125d4d5f98ace9700 (patch) | |
tree | 8858702c2c8a6ad4bf1bb861a4565e0a9c28e588 /tests/unittests/test_cli.py | |
parent | 5bd3493d732e5b1902872958e8681f17cbc81ce5 (diff) | |
download | cloud-init-trunk.tar.gz |
cloud-init development has moved its revision control to git.
It is available at
https://code.launchpad.net/cloud-init
Clone with
git clone https://git.launchpad.net/cloud-init
or
git clone git+ssh://git.launchpad.net/cloud-init
For more information see
https://git.launchpad.net/cloud-init/tree/HACKING.rst
Diffstat (limited to 'tests/unittests/test_cli.py')
-rw-r--r-- | tests/unittests/test_cli.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/unittests/test_cli.py b/tests/unittests/test_cli.py deleted file mode 100644 index 5fa252f7..00000000 --- a/tests/unittests/test_cli.py +++ /dev/null @@ -1,34 +0,0 @@ -import six - -from . import helpers as test_helpers - -from cloudinit.cmd import main as cli - -mock = test_helpers.mock - - -class TestCLI(test_helpers.FilesystemMockingTestCase): - - def setUp(self): - super(TestCLI, self).setUp() - self.stderr = six.StringIO() - self.patchStdoutAndStderr(stderr=self.stderr) - - def _call_main(self, sysv_args=None): - if not sysv_args: - sysv_args = ['cloud-init'] - try: - return cli.main(sysv_args=sysv_args) - except SystemExit as e: - return e.code - - def test_no_arguments_shows_usage(self): - exit_code = self._call_main() - self.assertIn('usage: cloud-init', self.stderr.getvalue()) - self.assertEqual(2, exit_code) - - def test_no_arguments_shows_error_message(self): - exit_code = self._call_main() - self.assertIn('cloud-init: error: too few arguments', - self.stderr.getvalue()) - self.assertEqual(2, exit_code) |