Skip to content

Commit

Permalink
RD tests: use established list-missing-modules mechanism from defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Nov 4, 2017
1 parent 04f9400 commit 11043bc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/test_rd_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@

from .test_server import WithAsyncLoop, Destructing, WithClient

try:
linkheader_modules = aiocoap.defaults.linkheader_missing_modules()
_skip_unless_linkheader = unittest.skipIf(linkheader_modules, "Modules missing for running RD tests: %s"%(linkheader_modules,))
if not linkheader_modules:
import link_header
import aiocoap.cli.rd
except ImportError:
link_header = None

_skip_unless_linkheader = unittest.skipIf(link_header is None, "RD tests require link header extension")

class WithResourceDirectory(WithAsyncLoop, Destructing):
rd_address = '::1'
Expand Down

0 comments on commit 11043bc

Please sign in to comment.