builder added, removed old files

This commit is contained in:
Hadrian Burkhardt
2023-11-30 02:32:40 +01:00
committed by f4lco
parent f714fc4c79
commit 58a53e608f
10 changed files with 447 additions and 306 deletions
+12 -19
View File
@@ -3,8 +3,8 @@
import io
import json
import os
import pytest
from stw_potsdam import feed
from stw_potsdam.config import read_canteen_config
@@ -25,50 +25,43 @@ def _read_feed(resource_name):
with io.open(_resource_path(resource_name), encoding='utf-8') as xml:
return xml.read()
@pytest.mark.xfail(strict=True)
def test_meta_consistency():
raise NotImplementedError()
canteen = _canteen()
menu_feed_url = f"canteens/{canteen.key}/menu"
menu_feed_url = f"canteens/{canteen.key}/xml"
actual = feed.render_meta(canteen, menu_feed_url)
expected = _read_feed('meta_output.xml')
assert expected == actual
@pytest.mark.xfail(strict=True)
def test_menu_consistency():
raise NotImplementedError()
menu = _read_menu('input.json')
actual = feed.render_menu(menu)
expected = _read_feed('menu_output.xml')
assert expected == actual
@pytest.mark.xfail(strict=True)
def test_empty_menu():
raise NotImplementedError()
menu = _read_menu('empty.json')
actual = feed.render_menu(menu)
expected = _read_feed('empty_menu_output.xml')
assert expected == actual
@pytest.mark.xfail(strict=True)
def test_offers_dictionary():
raise NotImplementedError()
menu = _read_menu('offers-dict.json')
actual = feed.render_menu(menu)
expected = _read_feed('offers-dict-output.xml')
assert expected == actual
@pytest.mark.xfail(strict=True)
def test_missing_category():
raise NotImplementedError()
menu = _read_menu('missing-category.json')
actual = feed.render_menu(menu)
expected = _read_feed('missing-category-output.xml')
assert expected == actual