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.
1 parent 990c82c commit 6f231ceCopy full SHA for 6f231ce
tests/test_httputils.py
@@ -0,0 +1,19 @@
1
+import pytest
2
+
3
+from app.utils import httputils
4
5
6
+@pytest.mark.asyncio
7
+async def test_setup_teardown_client_session():
8
+ with pytest.raises(AttributeError):
9
+ # Ensure client_session is undefined prior to setup
10
+ httputils.client_session
11
12
+ await httputils.setup_client_session()
13
14
+ assert httputils.client_session
15
16
+ await httputils.teardown_client_session()
17
+ assert httputils.client_session.closed
18
19
+ del httputils.client_session
0 commit comments