Suppress Cron when testing
This commit is contained in:
@ -146,5 +146,6 @@ def mensaSchedule():
|
|||||||
"""
|
"""
|
||||||
Nutzt vormittags die Funktion refreshMeals(), um die Essen zu aktualisieren
|
Nutzt vormittags die Funktion refreshMeals(), um die Essen zu aktualisieren
|
||||||
"""
|
"""
|
||||||
with flaskApp.app_context():
|
if not flaskApp.config["TESTING"]:
|
||||||
asyncio.run(refreshMeals())
|
with flaskApp.app_context():
|
||||||
|
asyncio.run(refreshMeals())
|
||||||
|
|||||||
@ -171,8 +171,9 @@ def raplaSchedule():
|
|||||||
"""
|
"""
|
||||||
Nutzt alle 3 Minuten refreshRapla() um die Stundenpläne zu aktualisieren.
|
Nutzt alle 3 Minuten refreshRapla() um die Stundenpläne zu aktualisieren.
|
||||||
"""
|
"""
|
||||||
with flaskApp.app_context():
|
if not flaskApp.config["TESTING"]:
|
||||||
asyncio.run(refreshRapla())
|
with flaskApp.app_context():
|
||||||
|
asyncio.run(refreshRapla())
|
||||||
|
|
||||||
|
|
||||||
async def buildICALfromKey(url, onlyUpdate, testing=False):
|
async def buildICALfromKey(url, onlyUpdate, testing=False):
|
||||||
|
|||||||
@ -157,9 +157,12 @@ async def test_url_anweisung_whitebox(app):
|
|||||||
:param app:
|
:param app:
|
||||||
"""
|
"""
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
rapla = await fetchRAPLA.getNewRapla("http://www.rapla.dhbw-karlsruhe.de/rapla?page=calendar&user=vollmer"
|
raplaPage = await fetchRAPLA.getNewRapla("http://www.rapla.dhbw-karlsruhe.de/rapla?page=calendar&user=vollmer"
|
||||||
"&file=tinf22b3", True)
|
"&file=tinf22b3", True)
|
||||||
assert "TINF22B3" in rapla
|
assert "TINF22B3" in raplaPage
|
||||||
|
raplaFile = await fetchRAPLA.getNewRapla("http://www.rapla.dhbw-karlsruhe.de/rapla?page=ical&user=vollmer"
|
||||||
|
"&file=tinf22b3", True)
|
||||||
|
assert "TINF22B3" in raplaFile
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio()
|
@pytest.mark.asyncio()
|
||||||
|
|||||||
Reference in New Issue
Block a user