예제 #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