main
py 26 lines 856 Bytes
Raw
1 import sys, os
2
3 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
4
5 import asyncio
6 import pytest
7 from helpers.email_client import read_messages
8 from helpers.dotenv import get_dotenv_value, load_dotenv
9
10
11 @pytest.mark.skip(reason="This test is disabled as it has eternal dependencies and tests nothing automatically, please move it to a script or a manual test")
12 @pytest.mark.asyncio
13 async def test():
14 load_dotenv()
15 messages = await read_messages(
16 account_type=get_dotenv_value("TEST_SERVER_TYPE", "imap"),
17 server=get_dotenv_value("TEST_EMAIL_SERVER"),
18 port=int(get_dotenv_value("TEST_EMAIL_PORT", 993)),
19 username=get_dotenv_value("TEST_EMAIL_USERNAME"),
20 password=get_dotenv_value("TEST_EMAIL_PASSWORD"),
21 )
22 print(messages)
23
24
25 if __name__ == "__main__":
26 asyncio.run(test())