2021-07-16 20:03:51 +02:00
|
|
|
# stanndard imports
|
|
|
|
import logging
|
|
|
|
import unittest
|
|
|
|
|
|
|
|
# external imports
|
|
|
|
from chainlib.chain import ChainSpec
|
|
|
|
|
|
|
|
# test imports
|
2021-07-18 12:02:14 +02:00
|
|
|
from tests.chaind_eth_base import TestSQLBase
|
2021-07-16 20:03:51 +02:00
|
|
|
|
|
|
|
logging.basicConfig(level=logging.DEBUG)
|
|
|
|
|
|
|
|
|
2021-07-18 12:02:14 +02:00
|
|
|
class TestAdapter(TestSQLBase):
|
2021-07-16 20:03:51 +02:00
|
|
|
|
|
|
|
def test_eth_adapter_translate(self):
|
2021-07-18 12:02:14 +02:00
|
|
|
self.adapter.translate(self.example_tx, self.chain_spec)
|
2021-07-16 20:03:51 +02:00
|
|
|
# succesful decode means translate is working, no further checks needed
|
|
|
|
|
|
|
|
|
|
|
|
def test_eth_adapter_add(self):
|
2021-07-18 12:02:14 +02:00
|
|
|
self.adapter.add(self.example_tx, self.chain_spec, session=self.session_chainqueue)
|
2021-07-16 20:03:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|