Put skipIf condition at correct place
This commit is contained in:
parent
7be92c72d4
commit
a0e36adebc
2 changed files with 6 additions and 3 deletions
|
|
@ -8,6 +8,8 @@ from django.conf import settings
|
|||
from django.core.management import call_command
|
||||
from django.test import TestCase, override_settings
|
||||
from model_mommy import mommy
|
||||
from unittest import skipIf
|
||||
|
||||
from datacenterlight.models import VMTemplate
|
||||
from datacenterlight.tasks import create_vm_task
|
||||
from membership.models import StripeCustomer
|
||||
|
|
@ -47,6 +49,10 @@ class CeleryTaskTestCase(TestCase):
|
|||
# OpenNebula
|
||||
call_command('fetchvmtemplates')
|
||||
|
||||
@skipIf(settings.OPENNEBULA_USERNAME is None or
|
||||
settings.OPENNEBULA_USERNAME is "",
|
||||
"""Opennebula details unavailable, so skipping test_create_vm_task
|
||||
""")
|
||||
def test_create_vm_task(self):
|
||||
"""Tests the create vm task for monthly subscription
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue