Skip to content

Commit

Permalink
add test, re #11727
Browse files Browse the repository at this point in the history
  • Loading branch information
apeters committed Jan 14, 2025
1 parent b469597 commit 6c48681
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests/utils/activitystream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/"])
Expand Down Expand Up @@ -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"]))

0 comments on commit 6c48681

Please sign in to comment.