forked from acdh-oeaw/pmb-service
-
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.
- Loading branch information
Showing
12 changed files
with
70 additions
and
45 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,30 @@ | ||
# from django.test import TestCase | ||
from django.apps import apps | ||
from django.conf import settings | ||
from django.test import Client, TestCase | ||
from django.urls import reverse | ||
|
||
# Create your tests here. | ||
|
||
client = Client() | ||
USER = {"username": "testuser", "password": "password", "is_active": True} | ||
BAHR = {"name": "Schnitzler", "first_name": "Hermann", "start_date_written": "1900"} | ||
|
||
ENTITY_TYPES = ["person", "place", "event", "work", "institution"] | ||
|
||
MODELS = list(apps.all_models["apis_entities"].values()) | ||
MEDIA_ROOT = settings.MEDIA_ROOT | ||
|
||
|
||
class DumperTestCase(TestCase): | ||
fixtures = [ | ||
"network.json", | ||
] | ||
|
||
def test_01_network(self): | ||
url = reverse("network:network") | ||
response = client.get(url) | ||
self.assertEqual(response.status_code, 200) | ||
|
||
def test_02_edge_list_view(self): | ||
url = reverse("network:edges_browse") | ||
response = client.get(url) | ||
self.assertEqual(response.status_code, 200) |
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,9 +1,10 @@ | ||
from django.urls import path | ||
from network.views import EdgeListViews, network_data | ||
from network.views import EdgeListViews, network_data, NetworkView | ||
|
||
|
||
app_name = "network" | ||
urlpatterns = [ | ||
path("edges/", EdgeListViews.as_view(), name="edges_browse"), | ||
path("csv/", network_data, name="data"), | ||
path("network/", NetworkView.as_view(), name="network"), | ||
] |
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