diff options
author | 2020-07-15 02:45:31 +0200 | |
---|---|---|
committer | 2020-07-15 02:45:31 +0200 | |
commit | c115dcfb72e4d4a86b66bb84a72984705a2afcd4 (patch) | |
tree | b1e7f79a21be8b482d65f00001de4e34ea68d5fe | |
parent | Move `find_nth_occurrence` to utils helpers (diff) |
Change tests to work with the new file layout.
326beebe9b097731a39ecc9868e5e1f2bd762aae
-rw-r--r-- | tests/bot/utils/test_services.py (renamed from tests/bot/utils/test_init.py) | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/bot/utils/test_init.py b/tests/bot/utils/test_services.py index f3a8f5939..5e0855704 100644 --- a/tests/bot/utils/test_init.py +++ b/tests/bot/utils/test_services.py @@ -4,14 +4,14 @@ from unittest.mock import AsyncMock, MagicMock, Mock, patch from aiohttp import ClientConnectorError -from bot.utils import FAILED_REQUEST_ATTEMPTS, send_to_paste_service +from bot.utils.services import FAILED_REQUEST_ATTEMPTS, send_to_paste_service class PasteTests(unittest.IsolatedAsyncioTestCase): def setUp(self) -> None: self.http_session = MagicMock() - @patch("bot.utils.URLs.paste_service", "https://paste_service.com/{key}") + @patch("bot.utils.services.URLs.paste_service", "https://paste_service.com/{key}") async def test_url_and_sent_contents(self): """Correct url was used and post was called with expected data.""" response = MagicMock( @@ -22,7 +22,7 @@ class PasteTests(unittest.IsolatedAsyncioTestCase): await send_to_paste_service(self.http_session, "Content") self.http_session.post.assert_called_once_with("https://paste_service.com/documents", data="Content") - @patch("bot.utils.URLs.paste_service", "https://paste_service.com/{key}") + @patch("bot.utils.services.URLs.paste_service", "https://paste_service.com/{key}") async def test_paste_returns_correct_url_on_success(self): """Url with specified extension is returned on successful requests.""" key = "paste_key" |