Skip to content

Commit

Permalink
#47 setup of tests was fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim55667757 committed Sep 29, 2022
1 parent 312ea95 commit 29e7591
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_TKSBrokerAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest
from datetime import datetime, timedelta
from dateutil.tz import tzutc
import json
from pathlib import Path
from tksbrokerapi import TKSBrokerAPI


Expand All @@ -18,12 +18,12 @@ def init(self):
TKSBrokerAPI.uLogger.handlers[1].level = 50 # Disable debug logging for log.txt

# set up default parameters:
self.testIList = json.load(open("./tests/InstrumentsDump.json", mode="r", encoding="UTF-8"))
Path("./tests/InstrumentsDump.json").touch() # "touching" file to avoid updating by "file outdated" trigger
self.server = TKSBrokerAPI.TinkoffBrokerServer(
token="TKSBrokerAPI_unittest_fake_token",
iList=self.testIList,
accountId="TKSBrokerAPI_unittest_fake_accountId",
useCache=False,
useCache=True,
defaultCache="./tests/InstrumentsDump.json",
)

def test_NanoToFloatCheckType(self):
Expand Down

0 comments on commit 29e7591

Please # to comment.