Skip to content

fix: Failing CI tests for v0.12 patch release #435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/frontendIntegration/django2x/polls/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
urlpatterns = [ # type: ignore
path("index.html", views.send_file, name="index.html"), # type: ignore
path("login", views.login, name="login"), # type: ignore
path("login-2.18", views.login_2_18, name="login"), # type: ignore
path("beforeeach", views.before_each, name="beforeeach"), # type: ignore
path("testUserConfig", views.test_config, name="testUserConfig"), # type: ignore
path(
Expand Down
12 changes: 12 additions & 0 deletions tests/frontendIntegration/django2x/polls/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,18 @@ def login(request: HttpRequest):
return send_options_api_response()


def login_2_18(request: HttpRequest):
if request.method == "POST":
body = json.loads(request.body)
user_id = body["userId"]
payload = body["payload"]

session_ = create_new_session(request, user_id, payload)
return HttpResponse(session_.get_user_id())
else:
return send_options_api_response()


def before_each(request: HttpRequest):
if request.method == "POST":
Test.reset()
Expand Down
1 change: 1 addition & 0 deletions tests/frontendIntegration/django3x/polls/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
urlpatterns = [ # type: ignore
path("index.html", views.send_file, name="index.html"), # type: ignore
path("login", views.login, name="login"), # type: ignore
path("login-2.18", views.login, name="login"), # type: ignore
path("beforeeach", views.before_each, name="beforeeach"), # type: ignore
path("testUserConfig", views.test_config, name="testUserConfig"), # type: ignore
path(
Expand Down
12 changes: 12 additions & 0 deletions tests/frontendIntegration/django3x/polls/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,18 @@ async def login(request: HttpRequest):
return send_options_api_response()


async def login_2_18(request: HttpRequest):
if request.method == "POST":
body = json.loads(request.body)
user_id = body["userId"]
payload = body["payload"]

session_ = await create_new_session(request, user_id, payload)
return HttpResponse(session_.get_user_id())
else:
return send_options_api_response()


async def before_each(request: HttpRequest):
if request.method == "POST":
Test.reset()
Expand Down
9 changes: 9 additions & 0 deletions tests/frontendIntegration/fastapi-server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,15 @@ async def login(request: Request):
return PlainTextResponse(content=_session.get_user_id())


@app.post("/login-2.18")
async def login_2_18(request: Request):
body = await request.json()
user_id = body["userId"]
payload = body["payload"]
_session = await create_new_session(request, user_id, payload)
return PlainTextResponse(content=_session.get_user_id())


@app.options("/beforeeach")
def before_each_options():
return send_options_api_response()
Expand Down
9 changes: 9 additions & 0 deletions tests/frontendIntegration/flask-server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,15 @@ def login():
return _session.get_user_id()


@app.route("/login-2.18", methods=["POST"]) # type: ignore
def login_2_18():
body: Dict[str, Any] = request.get_json() # type: ignore
user_id = body["userId"]
payload = body["payload"]
_session = create_new_session(request, user_id, payload)
return _session.get_user_id()


@app.route("/beforeeach", methods=["OPTIONS"]) # type: ignore
def before_each_options():
return send_options_api_response()
Expand Down