-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add test for new PRONOM detection functions
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
from .mdto import * | ||
from .mdto import _pronominfo_fido, _pronominfo_siegfried | ||
|
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,21 @@ | ||
import pytest | ||
import mdto | ||
from mdto.gegevensgroepen import * | ||
|
||
|
||
def test_pronom_siegfried(voorbeeld_archiefstuk_xml): | ||
"""Test siegfried-based PRONOM detection""" | ||
expected = BegripGegevens( | ||
"Extensible Markup Language", VerwijzingGegevens("PRONOM-register"), "fmt/101" | ||
) | ||
got = mdto._pronominfo_siegfried(voorbeeld_archiefstuk_xml) | ||
assert expected == got | ||
|
||
|
||
def test_pronom_fido(voorbeeld_archiefstuk_xml): | ||
"""Test fido-based PRONOM detection""" | ||
expected = BegripGegevens( | ||
"Extensible Markup Language", VerwijzingGegevens("PRONOM-register"), "fmt/101" | ||
) | ||
got = mdto._pronominfo_fido(voorbeeld_archiefstuk_xml) | ||
assert expected == got |