parse filters json only if filters are present #1919
Conversation
cfea091
to
8ec959f
Compare
mock_parse.return_value = ('mock', 'tuple') | ||
search_view = search.SearchView() | ||
mock_request = mock.MagicMock() | ||
mock_request.GET = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subtle difference, but I'd use a QueryDict
here, because why not?
I'm not sure this is the right solution. I can't find that we document anywhere that this is required, but I can think of ways this API is useful without using filters (pagination for example). If you do think it's a good idea to make this a requirement, please elaborate on why. |
cfd700f
to
0b31b57
Compare
@mhrivnak, I agree with you. updated. |
fixes: 1040
ok test |
Refer to this link for build results (access rights to CI server needed): Build result: FAILURE[...truncated 7 lines...]Fetching upstream changes from https://github.com/pulp/pulp.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/pulp/pulp.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse refs/remotes/origin/pr/1919/merge^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/pr/1919/merge^{commit} # timeout=10Checking out Revision ec87bdb (refs/remotes/origin/pr/1919/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f ec87bdb > git rev-list ec87bdb # timeout=10Triggering rhel5-npTriggering f20-npTriggering rhel7-npTriggering rhel6-npTriggering f21-nprhel5-np completed with result SUCCESSf20-np completed with result FAILURErhel7-np completed with result SUCCESSrhel6-np completed with result SUCCESSf21-np completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 3 secondSetting status of 023c106 to FAILURE with url https://pulp-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/unittest-pulp-pr/913/ and message: Merged build finished.Test FAILed. |
ok test |
mock_parse.return_value = ({'mock': 'query'}, 'tuple') | ||
search_view = search.SearchView() | ||
mock_request = mock.MagicMock() | ||
mock_request.GET = {'filters': 'invalid json'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use a QueryDict
here for authenticity. It might not make much difference, but we may as well keep tests as close to real circumstances as we can.
Refer to this link for build results (access rights to CI server needed): Build result: FAILURE[...truncated 7 lines...]Fetching upstream changes from https://github.com/pulp/pulp.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/pulp/pulp.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse refs/remotes/origin/pr/1919/merge^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/pr/1919/merge^{commit} # timeout=10Checking out Revision ec87bdb (refs/remotes/origin/pr/1919/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f ec87bdb > git rev-list ec87bdb # timeout=10Triggering rhel5-npTriggering f20-npTriggering rhel7-npTriggering rhel6-npTriggering f21-nprhel5-np completed with result SUCCESSf20-np completed with result FAILURErhel7-np completed with result SUCCESSrhel6-np completed with result SUCCESSf21-np completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 2 secondSetting status of 023c106 to FAILURE with url https://pulp-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/unittest-pulp-pr/914/ and message: Merged build finished.Test FAILed. |
moving to 2.7-testing #1923 |
…ches
fixes: 1040
https://pulp.plan.io/issues/1040