-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some tests were failing, and the contribution guide was a little dated
- Loading branch information
1 parent
de91830
commit 0a8377c
Showing
5 changed files
with
36 additions
and
15 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
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,14 @@ | ||
services: | ||
postgres: | ||
image: kartoza/postgis:14 | ||
environment: | ||
POSTGRES_USER: admin | ||
POSTGRES_PASS: admin | ||
POSTGRES_DB: gis_test | ||
ALLOW_IP_RANGE: 0.0.0.0/0 | ||
ports: | ||
- 5432:5432 | ||
redis: | ||
image: redis:6.2 | ||
ports: | ||
- 6379:6379 |
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 |
---|---|---|
|
@@ -47,7 +47,7 @@ def test_new_user_missing_field_error(missing_field, get_client: TestClient, bas | |
response = create_new_user(get_client, data, basic_auth_header, False) | ||
|
||
assert response.status_code == 422 | ||
assert response.json()["detail"][0].get("msg") == "field required" | ||
assert response.json()["detail"][0].get("msg") == "Field required" | ||
|
||
|
||
@pytest.mark.parametrize("email", ("[email protected]", "user.me", "uuser@email:", "user@email.")) | ||
|
@@ -57,7 +57,7 @@ def test_new_user_wrong_email_error(email, get_client: TestClient, basic_auth_he | |
response = create_new_user(get_client, auth_header=basic_auth_header, data=data, must_succeed=False) | ||
|
||
assert response.status_code == 422 | ||
assert response.json()["detail"][0].get("msg") == "value is not a valid email address" | ||
assert response.json()["detail"][0].get("msg")[:34] == "value is not a valid email address" | ||
|
||
|
||
def test_new_user_unauthorized(get_client, basic_auth_header): | ||
|
@@ -192,6 +192,6 @@ def test_admin_user_created(get_client, get_session: Session): | |
assert response.json()[0]["email"] == expected_email | ||
|
||
statement = select(User).where(User.id == 1) | ||
admin_user = get_session.exec(statement) | ||
admin_user = get_session.exec(statement).first() | ||
assert admin_user is not None | ||
assert admin_user.email == expected_email |