Skip to content

Commit

Permalink
bypass tests if required libs are not found
Browse files Browse the repository at this point in the history
  • Loading branch information
jsayles committed Apr 2, 2021
1 parent a2e3288 commit 8f18e25
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
7 changes: 6 additions & 1 deletion elocky/tests.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import unittest
try:
import elocky
except:
raise unittest.SkipTest("Elocky libraries unavailable. Skipping tests.")

from django.test import TestCase
from django.contrib.auth.models import User

from unittest.mock import patch

from elocky.models.alerts import MemberAlertManager
from elocky.models.elocky_cred import ElockyCred

import logging

Expand Down
6 changes: 6 additions & 0 deletions nextcloud/tests.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import unittest
try:
import owncloud
except:
raise unittest.SkipTest("Owncloud libraries unavailable. Skipping tests.")

from django.test import TestCase
from django.contrib.auth.models import User

Expand Down
6 changes: 6 additions & 0 deletions rocketchat/tests.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import unittest
try:
import RocketChat
except:
raise unittest.SkipTest("RocketChat libraries unavailable. Skipping tests.")

from django.test import TestCase
from django.contrib.auth.models import User

Expand Down

0 comments on commit 8f18e25

Please sign in to comment.