Skip to content

Commit

Permalink
Merge branch 'devel' into stabilize_deps
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdstrike committed Aug 15, 2023
2 parents 6b36e5c + 23cdb35 commit f93107d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
'aiosqlite',
'asyncpg',
'fastapi',
'httpx', # missing dep for another dep
'pydantic<2',
'pysqlite3',
'psycopg2-binary',
'sqlalchemy>=1.4.29,<2',
'starlette>=0.22.0',
'ujson',
'uvicorn',
'uuid'
Expand All @@ -35,7 +35,8 @@
'pytest',
'pytest-asyncio',
'requests',
'flake8'
'flake8',
'httpx'
]
}
)
10 changes: 5 additions & 5 deletions tests/pipeline_route_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
def http_create_pipeline(fastapi_testclient, pipeline):

response = fastapi_testclient.post(
'/pipelines', json=pipeline.dict(), allow_redirects=True
'/pipelines', json=pipeline.dict(), follow_redirects=True
)
assert response.status_code == status.HTTP_403_FORBIDDEN

response = fastapi_testclient.post(
'/pipelines', json=pipeline.dict(), allow_redirects=True,
'/pipelines', json=pipeline.dict(), follow_redirects=True,
headers=headers
)
assert response.status_code == status.HTTP_403_FORBIDDEN

response = fastapi_testclient.post(
'/pipelines', json=pipeline.dict(), allow_redirects=True,
'/pipelines', json=pipeline.dict(), follow_redirects=True,
headers=headers4power_user
)
assert response.status_code == status.HTTP_201_CREATED
Expand Down Expand Up @@ -116,7 +116,7 @@ def test_create_pipeline(async_minimum, fastapi_testclient):
response = fastapi_testclient.post(
'/pipelines',
json=desired_pipeline.dict(),
allow_redirects=True,
follow_redirects=True,
headers=headers4power_user
)
assert response.status_code == status.HTTP_409_CONFLICT, 'ptest two already in DB'
Expand Down Expand Up @@ -148,7 +148,7 @@ def test_create_pipeline(async_minimum, fastapi_testclient):
response = fastapi_testclient.post(
'/pipelines',
json=third_desired_pipeline.dict(),
allow_redirects=True,
follow_redirects=True,
headers=headers4power_user
)
assert response.status_code == status.HTTP_400_BAD_REQUEST
12 changes: 6 additions & 6 deletions tests/task_route_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_task_creation(async_minimum, fastapi_testclient):
response = fastapi_testclient.post(
'tasks',
json=task_one.dict(),
allow_redirects=True,
follow_redirects=True,
headers=headers4ptest_one
)
assert response.status_code == status.HTTP_201_CREATED
Expand All @@ -38,7 +38,7 @@ def test_task_creation(async_minimum, fastapi_testclient):
response = fastapi_testclient.post(
'tasks',
json=task_one.dict(),
allow_redirects=True,
follow_redirects=True,
headers=headers4ptest_one
)
assert response.status_code == status.HTTP_409_CONFLICT
Expand All @@ -56,7 +56,7 @@ def test_task_creation(async_minimum, fastapi_testclient):
response = fastapi_testclient.post(
'tasks',
json=task_two.dict(),
allow_redirects=True,
follow_redirects=True,
headers=headers4ptest_one
)
assert response.status_code == status.HTTP_403_FORBIDDEN
Expand All @@ -71,7 +71,7 @@ def test_task_update(async_minimum, fastapi_testclient):
response = fastapi_testclient.put(
'/tasks',
json=task,
allow_redirects=True,
follow_redirects=True,
headers=headers4ptest_one
)
assert response.status_code == status.HTTP_200_OK
Expand All @@ -86,7 +86,7 @@ def test_task_update(async_minimum, fastapi_testclient):
response = fastapi_testclient.put(
'/tasks',
json=modified_task.dict(),
allow_redirects=True,
follow_redirects=True,
headers=headers4ptest_one
)
assert response.status_code == status.HTTP_404_NOT_FOUND
Expand All @@ -101,7 +101,7 @@ def test_task_update(async_minimum, fastapi_testclient):
response = fastapi_testclient.put(
'/tasks',
json=modified_task.dict(),
allow_redirects=True,
follow_redirects=True,
headers=headers4ptest_one
)
assert response.status_code == status.HTTP_403_FORBIDDEN
Expand Down

0 comments on commit f93107d

Please sign in to comment.