Skip to content

Commit

Permalink
tests: add test for new PRONOM detection functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rien333 committed Dec 12, 2024
1 parent 047d03c commit d405ea2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mdto/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .mdto import *
from .mdto import _pronominfo_fido, _pronominfo_siegfried

21 changes: 21 additions & 0 deletions tests/test_pronom_detection.py
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

0 comments on commit d405ea2

Please sign in to comment.