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
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
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' }
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'}