Commit 94e265f
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)
(cherry picked from commit 9c2f297)1 parent b2fd01f commit 94e265f
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 | | |
| |||
635 | 636 | | |
636 | 637 | | |
637 | 638 | | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | 639 | | |
649 | 640 | | |
650 | 641 | | |
651 | 642 | | |
652 | 643 | | |
653 | 644 | | |
654 | 645 | | |
655 | | - | |
| 646 | + | |
656 | 647 | | |
657 | 648 | | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
658 | 659 | | |
659 | | - | |
660 | | - | |
661 | | - | |
| 660 | + | |
662 | 661 | | |
663 | 662 | | |
664 | 663 | | |
| |||
0 commit comments