forked from VNG-Realisatie/vng-api-common
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from maykinmedia/issue/config-view-500
🐛 add COMMONGROUND_API_COMMON_GET_DOMAIN to the exported vars
- Loading branch information
Showing
5 changed files
with
32 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,3 +93,5 @@ | |
"SECURITY_DEFINITIONS": {SECURITY_DEFINITION_NAME: {}}, | ||
} | ||
) | ||
|
||
IS_HTTPS = False |
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
# Custom function to get client for ClientConfig models | ||
def get_client(url): | ||
return "testclient" | ||
|
||
|
||
# Custom function to get client with auth for ClientConfig models | ||
def get_client_with_auth(url): | ||
class TestClient: | ||
auth = None | ||
|
||
return TestClient |
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,18 @@ | ||
from django.test import override_settings | ||
from django.urls import reverse | ||
|
||
import pytest | ||
from rest_framework import status | ||
|
||
|
||
@pytest.mark.django_db | ||
@override_settings(CUSTOM_CLIENT_FETCHER="testapp.utils.get_client_with_auth") | ||
def test_config_view(api_client): | ||
""" | ||
regression test for https://github.com/open-zaak/open-notificaties/issues/119 | ||
""" | ||
path = reverse("view-config") | ||
|
||
response = api_client.get(path) | ||
|
||
assert response.status_code == status.HTTP_200_OK |
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