Skip to content

Commit

Permalink
modified to deal with conflict during merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiran Li committed Mar 24, 2024
2 parents bba8b67 + acf58f4 commit a356675
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
name: Unit and Functional Pytest

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

Expand All @@ -23,6 +21,13 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install snapd
run: |
sudo apt update
sudo apt install snapd
- name: Install MiniZinc
run: |
sudo snap install minizinc --classic
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 3 additions & 1 deletion tests/functional/test_unavailability_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def test_get_volunteer_unavailability_success(test_client, create_user):
assert response.status_code == 200



def test_get_volunteer_unavailability_no_records(test_client, create_user):
user_id = create_user # Assuming this user has no unavailability records
test_client.post(f"/v2/volunteers/{user_id}/unavailability")
Expand All @@ -21,6 +22,7 @@ def test_get_volunteer_unavailability_no_records(test_client, create_user):
assert response.json == {"message": "No unavailability record found."} # Expected response body for no records



def test_get_volunteer_unavailability_invalid_user(test_client):
user_id = -1
test_client.environ_base.pop('HTTP_AUTHORIZATION', None)
Expand All @@ -37,4 +39,4 @@ def test_get_volunteer_unavailability_invalid_user(test_client):
assert response.status_code == 401 # Assuming the system treats requests for non-existent users as bad requests
# or not found
# assert response.json == {"message": "User not found"} # Assuming this is the response for an invalid user ID
# assert response.json == {'message': "The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."}
# assert response.json == {'message': "The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."}

0 comments on commit a356675

Please sign in to comment.