Skip to content
Myr

Merge pull request #3410 from haneybarg/bad_request

Before adoption: this commit came in with the history the project adopted, so no landing records it.

[BUG FIX] Test test_send_from_directory_bad_request fails in Python 3.8.

authored by David Lord · committed by GitHub · parents 9bdc42d, c367a86 · Browse files · 1 file+8 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−2 removed

  • tests:+8 added−2 removed

1 file+8 added−2 removed

modified:tests/test_helpers.py+8 added-2 removed
9 unmodified lines
10"""11import datetime12import io13import os14import sys15import uuid1617import pytest18from werkzeug.datastructures import Range
761 unmodified lines
780 rv.direct_passthrough = False781 assert rv.data.strip() == b"Hello Subdomain"782 rv.close()783783 def test_send_from_directory_bad_request(self, app, req_ctx):784 def test_send_from_directory_null_character(self, app, req_ctx):785 app.root_path = os.path.join(786 os.path.dirname(__file__), "test_apps", "subdomaintestmodule"787 )788789 if sys.version_info >= (3, 8):790 exception = NotFound791 else:792 exception = BadRequest793788 with pytest.raises(BadRequest):794 with pytest.raises(exception):795 flask.send_from_directory("static", "bad\x00")796797798class TestUrlFor(object):
252 unmodified lines