1
0
Fork 0
mirror of https://github.com/qurator-spk/modstool.git synced 2025-06-09 19:59:57 +02:00

🤪 modstool: Fiddle with the damn packaging/namespace so that stuff works

This commit is contained in:
Gerber, Mike 2019-08-29 16:15:48 +02:00
parent 5773b9c9b1
commit d885d6bfa2
3 changed files with 6 additions and 4 deletions

View file

@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
from .modstool import *

View file

@ -1,8 +1,10 @@
from qurator.modstool.modstool import mods_to_dict, flatten
import pytest
import xml.etree.ElementTree as ET
from .. import mods_to_dict, flatten
def dict_fromstring(x):
"""Helper function to parse a MODS XML string to a flattened dict"""
return flatten(mods_to_dict(ET.fromstring(x)))