From cbaf783ca9dccd233e431dd1630448b422d5013d Mon Sep 17 00:00:00 2001 From: Faster Speeding Date: Wed, 2 Feb 2022 23:37:36 +0000 Subject: [PATCH] Test fixes --- tests/hikari/impl/test_interaction_server.py | 5 ++++- tests/hikari/impl/test_rest_bot.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/hikari/impl/test_interaction_server.py b/tests/hikari/impl/test_interaction_server.py index f3aeabd13a..d5a7e840e9 100644 --- a/tests/hikari/impl/test_interaction_server.py +++ b/tests/hikari/impl/test_interaction_server.py @@ -21,6 +21,7 @@ # SOFTWARE. import asyncio import contextlib +import re import aiohttp.web import aiohttp.web_runner @@ -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()) diff --git a/tests/hikari/impl/test_rest_bot.py b/tests/hikari/impl/test_rest_bot.py index 25f7ae3b28..21776b3821 100644 --- a/tests/hikari/impl/test_rest_bot.py +++ b/tests/hikari/impl/test_rest_bot.py @@ -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")