We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6d60196 + ecddc2c commit 77d1e53Copy full SHA for 77d1e53
1 file changed
tests/python/pocketoption/test_sync_mocked.py
@@ -4,6 +4,7 @@
4
import types
5
from datetime import timedelta
6
from unittest.mock import AsyncMock, MagicMock
7
+from urllib.parse import urlparse
8
9
import pytest
10
@@ -529,7 +530,10 @@ def test_init_with_invalid_config_type(self):
529
530
def test_init_with_custom_url(self, mock_pocketoption_async):
531
"""Test that custom URL is added to config."""
532
client = PocketOption("test_ssid", url="wss://custom.com")
- assert "wss://custom.com" in client.config.urls
533
+ assert any(
534
+ (parsed.scheme, parsed.hostname) == ("wss", "custom.com")
535
+ for parsed in (urlparse(url) for url in client.config.urls)
536
+ )
537
client.shutdown()
538
539
0 commit comments