mirror of
https://github.com/Ichinga-Samuel/aiomql.git
synced 2026-08-24 17:28:25 +00:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user