コード例 #1
0
ファイル: pkg_test.py プロジェクト: AccelerationNet/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
コード例 #2
0
ファイル: pkg_test.py プロジェクト: AccelerationNet/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
コード例 #3
0
ファイル: pkg_test.py プロジェクト: AccelerationNet/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'
     }
コード例 #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