-
-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feat/add-rate-throttling
- Loading branch information
Showing
18 changed files
with
372 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "robyn" | ||
version = "0.34.0" | ||
version = "0.36.0" | ||
authors = ["Sanskar Jethi <[email protected]>"] | ||
edition = "2018" | ||
description = "A web server that is fast!" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import pytest | ||
|
||
from helpers.http_methods_helpers import get | ||
|
||
|
||
@pytest.mark.benchmark | ||
@pytest.mark.parametrize("function_type", ["sync", "async"]) | ||
def test_valid_authentication(session, function_type: str): | ||
r = get(f"/{function_type}/auth", headers={"Authorization": "Bearer valid"}) | ||
assert r.text == "authenticated" | ||
|
||
|
||
@pytest.mark.benchmark | ||
@pytest.mark.parametrize("function_type", ["sync", "async"]) | ||
def test_invalid_authentication_token(session, function_type: str): | ||
r = get( | ||
f"/{function_type}/auth", | ||
headers={"Authorization": "Bearer invalid"}, | ||
should_check_response=False, | ||
) | ||
assert r.status_code == 401 | ||
assert r.headers["WWW-Authenticate"] == "BearerGetter" | ||
|
||
|
||
@pytest.mark.benchmark | ||
@pytest.mark.parametrize("function_type", ["sync", "async"]) | ||
def test_invalid_authentication_header(session, function_type: str): | ||
r = get( | ||
f"/{function_type}/auth", | ||
headers={"Authorization": "Bear valid"}, | ||
should_check_response=False, | ||
) | ||
assert r.status_code == 401 | ||
assert r.headers["WWW-Authenticate"] == "BearerGetter" | ||
|
||
|
||
@pytest.mark.benchmark | ||
@pytest.mark.parametrize("function_type", ["sync", "async"]) | ||
def test_invalid_authentication_no_token(session, function_type: str): | ||
r = get(f"/{function_type}/auth", should_check_response=False) | ||
assert r.status_code == 401 | ||
assert r.headers["WWW-Authenticate"] == "BearerGetter" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "maturin" | |
|
||
[project] | ||
name = "robyn" | ||
version = "0.34.0" | ||
version = "0.36.0" | ||
description = "A web server that is fast!" | ||
authors = [{ name = "Sanskar Jethi", email = "[email protected]" }] | ||
dependencies = [ | ||
|
Oops, something went wrong.