1
0
datagraph/test/test_datagraph.py
Jon Michael Aanes 26891f95e8
All checks were successful
Python Package / Package (push) Has been skipped
Standardized versioning
2024-02-17 11:46:47 +01:00

26 lines
647 B
Python

import wikidata.client
import datagraph.schemeld
import datagraph.wikidata_ext
import requests_cache
datagraph.wikidata_ext.REQUEST_SESSION = requests_cache.CachedSession('testing')
def test_version():
assert datagraph.__version__ is not None
def test_get_triples():
client = wikidata.client.Client()
EQV_PROPERTY = client.get('P1628')
schema_root = "https://schema.org/"
schema_prop = "image"
triples_iter = datagraph.wikidata_ext.get_triples(
client = client,
predicate = EQV_PROPERTY,
object = "{}{}".format(schema_root, schema_prop),
)
assert triples_iter is not None