File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
src/mock_vws/_flask_server Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,11 @@ COPY --chown=myuser:myuser . /app
1111
1212# See https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
1313# For why we use this method of activating the virtual environment.
14- ENV VIRTUAL_ENV=/app/docker_venvs/.venv
1514ENV UV_PROJECT_ENVIRONMENT=/app/docker_venvs/.venv
16- ENV PATH="$VIRTUAL_ENV /bin:$PATH"
15+ ENV PATH="$UV_PROJECT_ENVIRONMENT /bin:$PATH"
1716
1817WORKDIR /app
19- RUN python3 -m venv $VIRTUAL_ENV && \
18+ RUN python3 -m venv $UV_PROJECT_ENVIRONMENT && \
2019 pip install --no-cache-dir uv==0.10.4 && \
2120 uv sync --no-cache
2221EXPOSE 5000
Original file line number Diff line number Diff line change 99import datetime
1010import io
1111import json
12+ import re
1213import textwrap
1314import time
1415import uuid
7273 """ ,
7374)
7475
76+ _JETTY_VERSION_RE = re .compile (pattern = r"Powered by Jetty:// [\d.]+" )
77+
7578_NGINX_REQUEST_ENTITY_TOO_LARGE_ERROR = textwrap .dedent (
7679 text = """\
7780 <html>\r
@@ -252,7 +255,11 @@ def test_incorrect_no_boundary(
252255 if resp_status_code != HTTPStatus .INTERNAL_SERVER_ERROR :
253256 handle_server_errors (response = vws_response )
254257
255- assert requests_response .text == resp_text
258+ repl = "Powered by Jetty://"
259+ sub = _JETTY_VERSION_RE .sub
260+ actual = sub (repl = repl , string = requests_response .text )
261+ expected = sub (repl = repl , string = resp_text )
262+ assert actual == expected
256263 assert_vwq_failure (
257264 response = vws_response ,
258265 status_code = resp_status_code ,
You can’t perform that action at this time.
0 commit comments