Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Uncomment sleep in resources and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieugouel committed Feb 8, 2018
1 parent c4dcffa commit 8212caa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions api/resources/main.py
@@ -1,6 +1,6 @@
"""Entrypoint of the main API Resources."""
# Useful to simulate a long action
# from time import sleep
from time import sleep

# Flask based imports
from flask_restplus import Resource, Namespace
Expand Down Expand Up @@ -40,5 +40,5 @@ def get(self, name):
@celery.task()
def asynchronous(name):
"""Async long task method."""
# sleep(5)
sleep(5)
return {'async': name}
3 changes: 3 additions & 0 deletions run.py
Expand Up @@ -2,6 +2,9 @@
# Api factory import
from api import factory

# Eventually force the environment
# factory.environment = 'default'

# Get flask instance
app = factory.flask

Expand Down
6 changes: 3 additions & 3 deletions test/conftest.py
Expand Up @@ -39,8 +39,8 @@ def flask_app(factory_app):
def celery_app(factory_app):
"""Fixture of celery instance creation."""
factory_app.set_flask()
factory_app.register(blueprint)
factory_app.set_celery()
factory_app.register(blueprint)
yield factory_app


Expand All @@ -54,6 +54,6 @@ def flask_app_client(flask_app):


@pytest.yield_fixture(scope='session')
def byeworld(celery_app):
def byeworld():
"""Fixture of ByeWorld resource."""
return ByeWorld()
return ByeWorld

0 comments on commit 8212caa

Please sign in to comment.