Skip to content

Commit

Permalink
Shuffle around the ael fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Goodlet committed Nov 30, 2017
1 parent 55a818a commit ec2f03a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
15 changes: 15 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,21 @@ def el(fshost):
assert not el.is_alive()


@pytest.fixture
def ael(el):
"""An event listener (el) with active event loop
Unsubscribe the listener from verbose updates.
"""
assert not el.connected()
# avoid latency caused by update events
el.unsubscribe("CALL_UPDATE")
el.connect()
el.start()
assert el.connected()
yield el
el.disconnect()


@pytest.yield_fixture
def client(fshost):
"""Deliver a core.Client connected to fshost
Expand Down
15 changes: 0 additions & 15 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@
import asyncio


@pytest.fixture
def ael(el):
"""An event listener (el) with active event loop
Unsubscribe the listener from verbose updates.
"""
assert not el.connected()
# avoid latency caused by update events
el.unsubscribe("CALL_UPDATE")
el.connect()
el.start()
assert el.connected()
yield el
el.disconnect()


def bridge2dest_callback(sess):
if sess['Call-Direction'] == 'inbound':
sess.bridge(dest_url=sess['variable_sip_req_uri'])
Expand Down

0 comments on commit ec2f03a

Please sign in to comment.