Reduce mocking in test_reject_open_redirect for compat
This is a followup for change Ie36401c782f023d1d5f2623732619105dc2cfa24
to reduce mocking in the unit test coverage for it.
While backporting the bug fix, it was found to be incompatible with
earlier versions of Python < 3.6 due to a difference in internal
implementation [1].
This reduces the mocking in the unit test to be more agnostic to the
internals of the StreamRequestHandler (ancestor of
SimpleHTTPRequestHandler) and work across Python versions >= 2.7.
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /803092 /opendev. org/openstack/ nova/commit/ 9c2f29783734cb5 f9cb05a08d328c1 0e1d16c4f1
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/wallaby
commit 9c2f29783734cb5 f9cb05a08d328c1 0e1d16c4f1
Author: melanie witt <email address hidden>
Date: Sat Jul 31 00:30:16 2021 +0000
Reduce mocking in test_reject_ open_redirect for compat
This is a followup for change Ie36401c782f023 d1d5f2623732619 105dc2cfa24
to reduce mocking in the unit test coverage for it.
While backporting the bug fix, it was found to be incompatible with
earlier versions of Python < 3.6 due to a difference in internal
implementation [1].
This reduces the mocking in the unit test to be more agnostic to the ndler (ancestor of equestHandler) and work across Python versions >= 2.7.
internals of the StreamRequestHa
SimpleHTTPR
Related-Bug: #1927677
[1] https:/ /github. com/python/ cpython/ commit/ 34eeed42901666f ce099947f93dfdf c05411f286
Change-Id: I546d376869a992 601b443fb95acf1 034da2a8f36 b4f5941d994c6cc 11107fc4af)
(cherry picked from commit 214cabe6848a1fd