Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

Commit

Permalink
tests: optional Celery test cases
Browse files Browse the repository at this point in the history
* FIX Skips running Celery test cases when the optional Celery extras
  aren't installed.

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
  • Loading branch information
tiborsimko committed Aug 26, 2015
1 parent ca264ec commit c4afa82
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_celery.py
Expand Up @@ -12,11 +12,15 @@
from __future__ import absolute_import, print_function, unicode_literals

from flask_appfactory import appfactory
from flask_appfactory.celery import celeryfactory

import pytest


def test_dummy_app():
""""Test celery app creation."""
pytest.importorskip("celery")
from flask_appfactory.celery import celeryfactory

class conf:
EXTENSIONS = ['flask_celeryext:FlaskCeleryExt']

Expand All @@ -29,6 +33,8 @@ class conf:

def test_dummy_app_noext():
""""Test celery app creation without extension."""
pytest.importorskip("celery")
from flask_appfactory.celery import celeryfactory
app = appfactory("app3", None)
celery = celeryfactory(app)
assert celery
Expand Down

0 comments on commit c4afa82

Please sign in to comment.