Skip to content

Commit

Permalink
Make webtest an optional dependency
Browse files Browse the repository at this point in the history
Resolves: latchset#38
  • Loading branch information
frozencemetery committed Aug 9, 2018
1 parent 898760d commit ddc3a26
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
from dns.rdatatype import SRV as RDTYPE_SRV
from dns.rdtypes.IN.SRV import SRV

from webtest import TestApp as WebTestApp
try:
from webtest import TestApp as WebTestApp
except ImportError:
print("webtest not installed! Tests will be skipped")
WebTestApp = "skip"

import kdcproxy
from kdcproxy import codec
Expand All @@ -45,6 +49,7 @@
KRB5_CONFIG = os.path.join(HERE, 'tests.krb5.conf')


@unittest.skipIf(WebTestApp == "skip", "webtest not installed")
class KDCProxyWSGITests(unittest.TestCase):
addrinfo = [
(2, 1, 6, '', ('128.66.0.2', 88)),
Expand Down

0 comments on commit ddc3a26

Please sign in to comment.