Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

property value should be a URI, re #11727 #11728

Merged
merged 5 commits into from
Jan 14, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add test, re #11727
apeters committed Jan 14, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 6c4868102f222dc24cbc017c91893618a9356cf6
18 changes: 12 additions & 6 deletions tests/utils/activitystream.py
Original file line number Diff line number Diff line change
@@ -17,23 +17,27 @@
"""

import os
import json
from unittest.mock import Mock
from tests.base_test import ArchesTestCase
from rdflib import Namespace
from arches.app.utils.activity_stream_jsonld import ActivityStreamCollection
from uuid import uuid4
from itertools import cycle
from datetime import datetime

from django.core.validators import URLValidator

from arches.app.utils.activity_stream_jsonld import ActivityStreamCollection
from arches.app.utils.betterJSONSerializer import JSONDeserializer
from arches.app.utils.data_management.resource_graphs.importer import (
import_graph as ResourceGraphImporter,
)
from arches.app.models.models import ResourceInstance
from arches.app.utils.skos import SKOSReader
from uuid import uuid4
from itertools import cycle
from datetime import datetime
import json
from arches.app.models.models import ResourceInstance, GraphModel

# these tests can be run from the command line via
# python manage.py test tests.utils.activitystream --settings="tests.test_settings"

ARCHES_NS = Namespace("https://arches.getty.edu/")
CIDOC_NS = Namespace("http://www.cidoc-crm.org/cidoc-crm/")
COL_NS = Namespace(ARCHES_NS["history/"])
@@ -164,3 +168,5 @@ def test_generate_page(self):
)
obj = collection_page.to_obj()
self.assertIn("id", obj["orderedItems"][0]["object"])
self.assertIsNone(URLValidator()(obj["orderedItems"][0]["object"]["id"]))