Skip to content

Commit

Permalink
fix route tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wochinge committed Nov 5, 2021
1 parent 57162ae commit d00e465
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/core/test_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,9 @@ def test_register_channel_without_route():
rasa.core.channels.channel.register([input_channel], app, route=None)

routes_list = utils.list_routes(app)
assert routes_list["custom_webhook_RestInput.receive"].startswith("/webhook")
assert routes_list[
"tests.core.test_channels.custom_webhook_RestInput.receive"
].startswith("/webhook")


def test_channel_registration_with_absolute_url_prefix_overwrites_route():
Expand All @@ -593,8 +595,12 @@ def test_channel_registration_with_absolute_url_prefix_overwrites_route():
# Assure that an absolute url returned by `url_prefix` overwrites route parameter
# given in `register`.
routes_list = utils.list_routes(app)
assert routes_list["custom_webhook_RestInput.health"].startswith(test_route)
assert ignored_base_route not in routes_list.get("custom_webhook_RestInput.health")
assert routes_list[
"tests.core.test_channels.custom_webhook_RestInput.health"
].startswith(test_route)
assert ignored_base_route not in routes_list.get(
"tests.core.test_channels.custom_webhook_RestInput.health"
)


@pytest.mark.parametrize(
Expand Down

0 comments on commit d00e465

Please sign in to comment.