-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in adding checksumAlgorithm triples
Closes one of #64
- Loading branch information
Showing
2 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import RDF | ||
|
||
from d1lod.processors.processor import Processor | ||
|
||
from .conftest import load_metadata, load_sysmeta | ||
from d1lod.processors.util import model_has_statement | ||
|
||
|
||
def test_processor_sets_checksum_and_algorithm(client, model): | ||
metadata = load_metadata("eml/eml-attribute-gym.xml") | ||
sysmeta = load_sysmeta("eml-attribute-gym-sysmeta.xml") | ||
|
||
processor = Processor(client, model, sysmeta, metadata, []) | ||
processor.process() | ||
|
||
assert model_has_statement( | ||
processor.model, | ||
RDF.Statement( | ||
None, | ||
RDF.Node(RDF.Uri("http://spdx.org/rdf/terms#algorithm")), | ||
None, | ||
), | ||
) | ||
|
||
assert model_has_statement( | ||
processor.model, | ||
RDF.Statement( | ||
None, | ||
RDF.Node(RDF.Uri("http://spdx.org/rdf/terms#checksumValue")), | ||
None, | ||
), | ||
) |