salt/tests/unit/utils/args_test.py
Nicole Thomas 3ebba020b6 Rename some unit test files by adding _test (#34503)
These two test files are currently not running automatically on Jenkins.
Renaming these files will add them to the full runtests.py run.
2016-07-07 12:05:08 -04:00

34 lines
809 B
Python

# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
# Import Salt Libs
from salt.utils import args
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import NO_MOCK, NO_MOCK_REASON
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')
@skipIf(NO_MOCK, NO_MOCK_REASON)
class ArgsTestCase(TestCase):
'''
TestCase for salt.utils.args module
'''
def test_condition_input_string(self):
'''
Test passing a jid on the command line
'''
cmd = args.condition_input(['*', 'foo.bar', 20141020201325675584], None)
self.assertIsInstance(cmd[2], str)
if __name__ == '__main__':
from integration import run_tests
run_tests(ArgsTestCase, needs_daemon=False)