reorganize the library into three folders lib, contrib and core

Write unittests with pytest
Make all functions and method signatures as keyword only arguments
This commit is contained in:
Ichinga Samuel
2024-10-06 23:20:59 +01:00
parent 9b55214d1a
commit 76a947640f
68 changed files with 1439 additions and 817 deletions
+20
View File
@@ -0,0 +1,20 @@
import pytest
from aiomql.lib.account import Account
class TestAccount:
@classmethod
def setup_class(cls):
cls.account = Account()
@pytest.fixture(scope='class', autouse=True)
async def refresh(self):
await self.account.refresh()
async def test_connected(self):
assert self.account.connected is True
async def test_account_info(self):
acc_info = await self.account.mt5.account_info()
assert acc_info.login == self.account.login
assert acc_info.server == self.account.server