We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4bdb53 commit 128348eCopy full SHA for 128348e
1 file changed
tests/test_fairstep.py
@@ -246,8 +246,8 @@ def test_shacl_does_not_validate(self):
246
247
assert len(step.rdf) == n_triples_before, 'shacl_validate mutated RDF'
248
249
-
250
-def test_is_fairstep_decorator():
+@patch('fairworkflows.rdf_wrapper.NanopubClient.publish')
+def test_is_fairstep_decorator(mock_publish):
251
@is_fairstep(label='test_label')
252
def add(a: int, b: int) -> int:
253
"""
@@ -257,6 +257,9 @@ def add(a: int, b: int) -> int:
257
258
assert hasattr(add(1,2), '_fairstep')
259
260
+ add._fairstep.publish_as_nanopub()
261
+ assert mock_publish.call_count == 1
262
+
263
def test_decorator_semantic_types():
264
test_types_a = ['http://www.example.org/distance', 'http://www.example.org/number']
265
test_type_output = 'http://www.example.org/walrus'
0 commit comments