Skip to content

Commit

Permalink
Add test to index resources using graph slug
Browse files Browse the repository at this point in the history
  • Loading branch information
bferguso committed Jul 19, 2024
1 parent c1c504c commit bb49837
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/fixtures/resource_graphs/Resource Test Model.json
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@
"ontologyclass": null,
"sortorder": 0
},
"slug": null,
"slug": "resource_test_model",
"subtitle": "",
"template_id": "50000000-0000-0000-0000-000000000001",
"version": ""
Expand Down
5 changes: 5 additions & 0 deletions tests/models/resource_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def setUpClass(cls):
resource_graph_importer(archesfile["graph"])

cls.search_model_graphid = uuid.UUID("c9b37a14-17b3-11eb-a708-acde48001122")
cls.search_model_slug = "resource_test_model"
cls.search_model_cultural_period_nodeid = "c9b3882e-17b3-11eb-a708-acde48001122"
cls.search_model_creation_date_nodeid = "c9b38568-17b3-11eb-a708-acde48001122"
cls.search_model_destruction_date_nodeid = (
Expand Down Expand Up @@ -288,6 +289,10 @@ def test_reindex_by_resource_type(self):
[self.search_model_graphid], clear_index=True, batch_size=4000
)

result = index_resources_by_type(
[self.search_model_slug], clear_index=True, batch_size=4000
)

self.assertEqual(result, "Passed")

def test_publication_restored_on_save(self):
Expand Down

0 comments on commit bb49837

Please sign in to comment.