示例#1
0
 def test_pkg_with_no_input(self):
     '''
     no paths should return an exception
     '''
     output = pkg.find_owner(self.cmd_run,
                             self.pkg_query_cmd)
     assert 'Error' in output
示例#2
0
 def test_pkg_nonstring_input(self):
     '''
     a non-string input should result in test pkg failing
     '''
     output = pkg.find_owner(self.cmd_run,
                             self.pkg_query_cmd,
                             None)
     assert 'Error' in output
示例#3
0
 def test_pkg_with_valid_commadelimited_input(self):
     '''
     passing in a string of comma-delimited should return a valid dictionary of path->cmd_run result
     '''
     output = pkg.find_owner(self.cmd_run,
                             self.pkg_query_cmd,
                             'foo,bar')
     assert output == {
         'foo': 'test foo',
         'bar': 'test bar'
     }
示例#4
0
文件: pkg_test.py 项目: talwai/salt
 def test_pkg_with_valid_commadelimited_input(self):
     '''
     passing in a string of comma-delimited should return a valid dictionary of path->cmd_run result
     '''
     output = pkg.find_owner(self.cmd_run, self.pkg_query_cmd, 'foo,bar')
     assert output == {'foo': 'test foo', 'bar': 'test bar'}
示例#5
0
文件: pkg_test.py 项目: talwai/salt
 def test_pkg_with_no_input(self):
     '''
     no paths should return an exception
     '''
     output = pkg.find_owner(self.cmd_run, self.pkg_query_cmd)
     assert 'Error' in output
示例#6
0
文件: pkg_test.py 项目: talwai/salt
 def test_pkg_nonstring_input(self):
     '''
     a non-string input should result in test pkg failing
     '''
     output = pkg.find_owner(self.cmd_run, self.pkg_query_cmd, None)
     assert 'Error' in output