added retry decorator on test_webapp.py

This commit is contained in:
Luis Aleixo 2022-05-10 17:02:40 +02:00
parent e3d9dc66ff
commit 45a8e73a48

View file

@ -2,11 +2,12 @@ from pathlib import Path
import pytest
import tornado.testing
from retry import retry
import cara.apps.calculator
from cara.apps.calculator.report_generator import generate_permalink
_TIMEOUT = 30.
_TIMEOUT = 20.
@pytest.fixture
def app():
@ -42,6 +43,7 @@ async def test_404(http_server_client):
assert resp.code == 404
@retry()
class TestBasicApp(tornado.testing.AsyncHTTPTestCase):
def get_app(self):
return cara.apps.calculator.make_app()
@ -70,6 +72,7 @@ class TestBasicApp(tornado.testing.AsyncHTTPTestCase):
assert 'expected number of new cases is' in response.body.decode()
@retry()
class TestCernApp(tornado.testing.AsyncHTTPTestCase):
def get_app(self):
cern_theme = Path(cara.apps.calculator.__file__).parent.parent / 'themes' / 'cern'
@ -82,6 +85,7 @@ class TestCernApp(tornado.testing.AsyncHTTPTestCase):
assert 'expected number of new cases is' in response.body.decode()
retry()
class TestOpenApp(tornado.testing.AsyncHTTPTestCase):
def get_app(self):
return cara.apps.calculator.make_app(calculator_prefix="/mycalc")