Completed
Push — main ( 5e6d02...339f4c )
by
unknown
15s queued 12s
created

tests.test_tradehub_get_block_time   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2
1
from tests import APITestCase, mainnet_client
2
3
4
class TestTradeHubGetBlockTime(APITestCase):
5
6
    def setUp(self) -> None:
7
        self._client = mainnet_client
8
9
    def test_get_block_time_structure(self):
10
        """
11
        Check if response match expected dict structure.
12
        :return:
13
        """
14
15
        expect: str = "HH:MM:SS.ZZZZZZ"
16
17
        result: str = self._client.get_block_time()
18
19
        self.assertIsInstance(result, str)
20
21
        self.assertAlmostEqual(len(result), len(expect), msg=f"Check if expected length matches actual length failed.", delta=3)
22