Skip to content

Commit

Permalink
chore: remove aiohttp pin (#101)
Browse files Browse the repository at this point in the history
* chore: remove aiohttp pin

Signed-off-by: F.N. Claessen <[email protected]>

* fix: convery sync test into async test to create and event loop which is needed for aiohttp.ClientSession

Signed-off-by: Victor Garcia Reolid <[email protected]>

---------

Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: Victor Garcia Reolid <[email protected]>
Co-authored-by: Victor Garcia Reolid <[email protected]>
  • Loading branch information
Flix6x and victorgarcia98 authored Jan 24, 2025
1 parent ece5a48 commit 12459f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ python_requires >= 3.9
# For more information, check out https://semver.org/.
install_requires =
importlib-metadata; python_version<"3.8"
aiohttp<=3.9.1
aiohttp
pandas>=2.1.4
s2-python>=0.4.1 # reason: be compatible with constraint pydantic>=2.8.2
async_timeout
Expand Down
9 changes: 6 additions & 3 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
),
],
)
def test__init__(
@pytest.mark.asyncio
async def test__init__(
ssl,
host,
api_version,
Expand Down Expand Up @@ -134,12 +135,14 @@ def test__init__(
),
],
)
def test__post_init__(kwargs, error_type, error_text):
@pytest.mark.asyncio
async def test__post_init__(kwargs, error_type, error_text):
with pytest.raises(error_type, match=error_text):
FlexMeasuresClient(**kwargs)


def test_build_url():
@pytest.mark.asyncio
async def test_build_url():
flexmeasures_client = FlexMeasuresClient("password", "[email protected]")
url = flexmeasures_client.build_url(uri="endpoint", path="/path/")
assert url.human_repr() == "http://localhost:5000/path/endpoint"
Expand Down

0 comments on commit 12459f0

Please sign in to comment.