mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
32 lines
797 B
Python
32 lines
797 B
Python
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
# Import python libs
|
||
|
from __future__ import absolute_import
|
||
|
|
||
|
# Import Salt Testing libs
|
||
|
from tests.support.case import ShellCase
|
||
|
|
||
|
|
||
|
class SPMTest(ShellCase):
|
||
|
'''
|
||
|
Test spm script
|
||
|
'''
|
||
|
|
||
|
def test_spm_help(self):
|
||
|
'''
|
||
|
test --help argument for spm
|
||
|
'''
|
||
|
expected_args = ['--version', '--assume-yes', '--help']
|
||
|
output = self.run_spm('--help')
|
||
|
for arg in expected_args:
|
||
|
self.assertIn(arg, ''.join(output))
|
||
|
|
||
|
def test_spm_bad_arg(self):
|
||
|
'''
|
||
|
test correct output when bad argument passed
|
||
|
'''
|
||
|
expected_args = ['--version', '--assume-yes', '--help']
|
||
|
output = self.run_spm('doesnotexist')
|
||
|
for arg in expected_args:
|
||
|
self.assertIn(arg, ''.join(output))
|