Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FasterSpeeding committed Feb 2, 2022
1 parent a978237 commit cbaf783
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/hikari/impl/test_interaction_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# SOFTWARE.
import asyncio
import contextlib
import re

import aiohttp.web
import aiohttp.web_runner
Expand Down Expand Up @@ -156,7 +157,9 @@ def test_when_content_type_provided(self):
def test_interaction_server_init_when_no_pynacl():
with pytest.raises(
RuntimeError,
match="You must install the optional `hikari[server]` dependencies to use the default interaction server.",
match=re.escape(
"You must install the optional `hikari[server]` dependencies to use the default interaction server."
),
):
interaction_server_impl.InteractionServer(entity_factory=mock.Mock(), rest_client=mock.Mock())

Expand Down
1 change: 1 addition & 0 deletions tests/hikari/impl/test_rest_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def test___init___generates_default_settings(self):
stack.enter_context(mock.patch.object(rest_impl, "RESTClientImpl"))
stack.enter_context(mock.patch.object(config, "HTTPSettings"))
stack.enter_context(mock.patch.object(config, "ProxySettings"))
stack.enter_context(mock.patch.object(interaction_server_impl, "InteractionServer"))

with stack:
result = cls("token", "token_type")
Expand Down

0 comments on commit cbaf783

Please sign in to comment.