Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
Fixed issue where fuzzy searches were returning as reversed
Browse files Browse the repository at this point in the history
  • Loading branch information
Amit Shah committed Jan 21, 2015
1 parent 90066d3 commit acddf6c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion jenkins/jenkins_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def _get_jobs_json():

if query:
filtered_jobs = self._workflow.filter(query, jobs, lambda x: x.name)
filtered_jobs.reverse()
return filtered_jobs
else:
if not jobs:
Expand Down
2 changes: 1 addition & 1 deletion test/unit/jenkins_interface_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_get_all_jobs_filters_with_query(self, mock_get):
query = "test"
jobs = self.jenkins_interface.get_all_jobs(query=query)
self.assertEqual(2, len(jobs))
self.assertTrue(all(["two" in jobs[0].name, "one" in jobs[1].name]))
self.assertTrue(all(["one" in jobs[0].name, "two" in jobs[1].name]))

@patch("jenkins.jenkins_interface.web.get")
def test_get_all_failing_jobs(self, mock_get):
Expand Down

0 comments on commit acddf6c

Please sign in to comment.