Ejemplo n.º 1
0
def test_should_check_error_when_petisco_is_not_initialized():
    with pytest.raises(Exception) as excinfo:
        Petisco.get_instance()
        solutions_text = (
            f"\t Possible Solutions:\n"
            f"\t  * If you are testing and need any preconfigured Petisco, you can use the fixture given_any_petisco.\n"
            f"\t  * If you are testing and need specific preconfigured Petisco, you can create a fixture loading a petisco and then clearing.\n"
            f"\t  * If you are running a Petisco application, please review your loading process, petisco.yml is probably failing.\n"
        )
        assert solutions_text in str(excinfo.value)
from taskmanager import petisco_setup, persistence_setup
from petisco import Petisco

petisco_setup()
persistence_setup()
app = Petisco.get_instance().get_app()
Ejemplo n.º 3
0
def main():
    petisco_setup()
    persistence_setup()
    Petisco.get_instance().get_app()
    Petisco.get_instance().start()
Ejemplo n.º 4
0
def petisco_client_flask_app(taskmanager_sql_database):
    app = Petisco.get_instance().get_app()
    with app.app.test_client() as c:
        yield c
    Petisco.get_instance().stop()