Skip to content

Commit

Permalink
fix: enable all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Nov 28, 2024
1 parent 1899fca commit 160733d
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 130 deletions.
212 changes: 106 additions & 106 deletions .circleci/config_continue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,105 +318,105 @@ workflows:
parameters:
cdi-version: placeholder
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
# - test-backend-sdk-testing:
# requires:
# - test-dev-tag-as-not-passed
# context:
# - slack-notification
# filters:
# tags:
# only: /dev-v[0-9]+(\.[0-9]+)*/
# branches:
# only: /test-cicd\/.*/
# matrix:
# parameters:
# cdi-version: placeholder
# fdi-version: placeholder
# python-version: ['3.8', '3.13']
# - test-website-fastapi:
# requires:
# - test-dev-tag-as-not-passed
# context:
# - slack-notification
# matrix:
# parameters:
# fdi-version: placeholder
# python-version: ['3.8', '3.13']
# filters:
# tags:
# only: /dev-v[0-9]+(\.[0-9]+)*/
# branches:
# only: /test-cicd\/.*/
# - test-website-flask:
# requires:
# - test-dev-tag-as-not-passed
# context:
# - slack-notification
# matrix:
# parameters:
# fdi-version: placeholder
# python-version: ['3.8', '3.13']
# filters:
# tags:
# only: /dev-v[0-9]+(\.[0-9]+)*/
# branches:
# only: /test-cicd\/.*/
# - test-website-django:
# requires:
# - test-dev-tag-as-not-passed
# context:
# - slack-notification
# matrix:
# parameters:
# fdi-version: placeholder
# python-version: ['3.8', '3.13']
# filters:
# tags:
# only: /dev-v[0-9]+(\.[0-9]+)*/
# branches:
# only: /test-cicd\/.*/
# - test-website-drf-async:
# requires:
# - test-dev-tag-as-not-passed
# context:
# - slack-notification
# matrix:
# parameters:
# fdi-version: placeholder
# python-version: ['3.8', '3.13']
# filters:
# tags:
# only: /dev-v[0-9]+(\.[0-9]+)*/
# branches:
# only: /test-cicd\/.*/
# - test-website-drf-sync:
# requires:
# - test-dev-tag-as-not-passed
# context:
# - slack-notification
# matrix:
# parameters:
# fdi-version: placeholder
# python-version: ['3.8', '3.13']
# filters:
# tags:
# only: /dev-v[0-9]+(\.[0-9]+)*/
# branches:
# only: /test-cicd\/.*/
# - test-website-django2x:
# requires:
# - test-dev-tag-as-not-passed
# context:
# - slack-notification
# matrix:
# parameters:
# fdi-version: placeholder
# python-version: ['3.8', '3.13']
# filters:
# tags:
# only: /dev-v[0-9]+(\.[0-9]+)*/
# branches:
# only: /test-cicd\/.*/
- test-backend-sdk-testing:
requires:
- test-dev-tag-as-not-passed
context:
- slack-notification
filters:
tags:
only: /dev-v[0-9]+(\.[0-9]+)*/
branches:
only: /test-cicd\/.*/
matrix:
parameters:
cdi-version: placeholder
fdi-version: placeholder
python-version: ['3.8', '3.13']
- test-website-fastapi:
requires:
- test-dev-tag-as-not-passed
context:
- slack-notification
matrix:
parameters:
fdi-version: placeholder
python-version: ['3.8', '3.13']
filters:
tags:
only: /dev-v[0-9]+(\.[0-9]+)*/
branches:
only: /test-cicd\/.*/
- test-website-flask:
requires:
- test-dev-tag-as-not-passed
context:
- slack-notification
matrix:
parameters:
fdi-version: placeholder
python-version: ['3.8', '3.13']
filters:
tags:
only: /dev-v[0-9]+(\.[0-9]+)*/
branches:
only: /test-cicd\/.*/
- test-website-django:
requires:
- test-dev-tag-as-not-passed
context:
- slack-notification
matrix:
parameters:
fdi-version: placeholder
python-version: ['3.8', '3.13']
filters:
tags:
only: /dev-v[0-9]+(\.[0-9]+)*/
branches:
only: /test-cicd\/.*/
- test-website-drf-async:
requires:
- test-dev-tag-as-not-passed
context:
- slack-notification
matrix:
parameters:
fdi-version: placeholder
python-version: ['3.8', '3.13']
filters:
tags:
only: /dev-v[0-9]+(\.[0-9]+)*/
branches:
only: /test-cicd\/.*/
- test-website-drf-sync:
requires:
- test-dev-tag-as-not-passed
context:
- slack-notification
matrix:
parameters:
fdi-version: placeholder
python-version: ['3.8', '3.13']
filters:
tags:
only: /dev-v[0-9]+(\.[0-9]+)*/
branches:
only: /test-cicd\/.*/
- test-website-django2x:
requires:
- test-dev-tag-as-not-passed
context:
- slack-notification
matrix:
parameters:
fdi-version: placeholder
python-version: ['3.8', '3.13']
filters:
tags:
only: /dev-v[0-9]+(\.[0-9]+)*/
branches:
only: /test-cicd\/.*/
- test-authreact-fastapi:
requires:
- test-dev-tag-as-not-passed
Expand Down Expand Up @@ -462,13 +462,13 @@ workflows:
- test-success:
requires:
- test-unit
# - test-backend-sdk-testing
# - test-website-fastapi
# - test-website-flask
# - test-website-django
# - test-website-drf-async
# - test-website-drf-sync
# - test-website-django2x
- test-backend-sdk-testing
- test-website-fastapi
- test-website-flask
- test-website-django
- test-website-drf-async
- test-website-drf-sync
- test-website-django2x
- test-authreact-fastapi
- test-authreact-flask
- test-authreact-django
Expand Down
2 changes: 1 addition & 1 deletion tests/auth-react/django3x/mysite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"supertokens_python.framework.django.django_middleware.middleware",
"mysite.middleware.response_logging_middleware",
# "mysite.middleware.response_logging_middleware", # Uncomment this for response logging
]

ROOT_URLCONF = "mysite.urls"
Expand Down
39 changes: 20 additions & 19 deletions tests/auth-react/fastapi-server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,25 +174,26 @@
os.environ.setdefault("SUPERTOKENS_ENV", "testing")


@app.middleware("http")
async def log_response(request: Request, call_next): # type: ignore
response = await call_next(request) # type: ignore

try:
body_bytes = b""
async for chunk in response.body_iterator: # type: ignore
body_bytes += chunk # type: ignore
print(f"Response: {body_bytes.decode('utf-8')}") # type: ignore
response_with_body = Response(
content=body_bytes,
status_code=response.status_code, # type: ignore
headers=response.headers, # type: ignore
media_type=response.media_type, # type: ignore
)
return response_with_body
except:
pass
return response # type: ignore
# Uncomment the following for response logging
# @app.middleware("http")
# async def log_response(request: Request, call_next): # type: ignore
# response = await call_next(request) # type: ignore

# try:
# body_bytes = b""
# async for chunk in response.body_iterator: # type: ignore
# body_bytes += chunk # type: ignore
# print(f"Response: {body_bytes.decode('utf-8')}") # type: ignore
# response_with_body = Response(
# content=body_bytes,
# status_code=response.status_code, # type: ignore
# headers=response.headers, # type: ignore
# media_type=response.media_type, # type: ignore
# )
# return response_with_body
# except:
# pass
# return response # type: ignore


code_store: Dict[str, List[Dict[str, Any]]] = {}
Expand Down
9 changes: 5 additions & 4 deletions tests/auth-react/flask-server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1095,10 +1095,11 @@ def make_default_options_response():
)


@app.after_request
def after_request(response): # type: ignore
print(f"Response: {response.get_data(as_text=True)}") # type: ignore
return response # type: ignore
# Uncomment the following for response logging
# @app.after_request
# def after_request(response): # type: ignore
# print(f"Response: {response.get_data(as_text=True)}") # type: ignore
# return response # type: ignore


@app.route("/ping", methods=["GET"]) # type: ignore
Expand Down

0 comments on commit 160733d

Please sign in to comment.