1
0
Fork 0
eos-downloader/tests/lib/fixtures.py
Daniel Baumann 8d2f70e3c7
Merging upstream version 0.12.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-10 06:39:52 +01:00

21 lines
478 B
Python

#!/usr/bin/python
# coding: utf-8 -*-
"""Fixtures for tests"""
import pytest
import os
import xml.etree.ElementTree as ET
# Fixtures
@pytest.fixture
def xml_path() -> str:
"""Fixture to provide path to test XML file"""
return os.path.join(os.path.dirname(os.path.dirname(__file__)), "data.xml")
@pytest.fixture
def xml_data():
xml_file = os.path.join(os.path.dirname(__file__), "data.xml")
tree = ET.parse(xml_file)
root = tree.getroot()
return root