Commit 9c2f297
committed
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.
Related-Bug: #1927677
[1] python/cpython@34eeed4
Change-Id: I546d376869a992601b443fb95acf1034da2a8f36
(cherry picked from commit 214cabe)1 parent b0099aa commit 9c2f297
1 file changed
+13
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
625 | 626 | | |
626 | 627 | | |
627 | 628 | | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | 629 | | |
639 | 630 | | |
640 | 631 | | |
641 | 632 | | |
642 | 633 | | |
643 | 634 | | |
644 | 635 | | |
645 | | - | |
| 636 | + | |
646 | 637 | | |
647 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
648 | 649 | | |
649 | | - | |
650 | | - | |
651 | | - | |
| 650 | + | |
652 | 651 | | |
653 | 652 | | |
654 | 653 | | |
| |||
0 commit comments