diff --git a/setup.cfg b/setup.cfg index e72f239..0d09d2c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,7 +23,7 @@ licence_files = [options] -python_requires = >= 3.6 +python_requires = >= 3.8 include_package_data = True packages = cic diff --git a/tests/base_cic.py b/tests/base_cic.py index e50c7dc..b6d69f2 100644 --- a/tests/base_cic.py +++ b/tests/base_cic.py @@ -36,18 +36,18 @@ class TestCICBase(unittest.TestCase): for i in range(3): address_bytes = f.read(32) addresses.append(add_0x(address_bytes.hex())) - f.close() - -# addresses = [ -# add_0x(random.randbytes(20).hex()), -# add_0x(random.randbytes(20).hex()), -# add_0x(random.randbytes(20).hex()), -# ] self.token_symbol = 'FOO' - self.token_address = add_0x(random.randbytes(32).hex()) - self.token_index_address = add_0x(random.randbytes(32).hex()) - self.address_declarator_address = add_0x(random.randbytes(32).hex()) + + token_address_bytes = f.read(20) + token_index_address_bytes = f.read(20) + address_declarator_address_bytes = f.read(20) + + self.token_address = add_0x(token_address_bytes.hex()) + self.token_index_address = add_0x(token_index_address_bytes.hex()) + self.address_declarator_address = add_0x(address_declarator_address_bytes.hex()) + + f.close() self.outputs_dir = tempfile.mkdtemp() self.outputs_writer = KVWriter(self.outputs_dir) diff --git a/tests/eth/base_eth.py b/tests/eth/base_eth.py index c9f4f16..81daf58 100644 --- a/tests/eth/base_eth.py +++ b/tests/eth/base_eth.py @@ -41,8 +41,15 @@ class TestCICEthBase(EthTesterCase): def setUp(self): super(TestCICEthBase, self).setUp() random.seed(42) - self.initial_description = add_0x(random.randbytes(32).hex()) - self.token_address = add_0x(random.randbytes(20).hex()) + + f = open('/dev/urandom', 'rb') + #self.initial_description = add_0x(random.randbytes(32).hex()) + #self.token_address = add_0x(random.randbytes(20).hex()) + initial_description_bytes = f.read(32) + self.initial_description = add_0x(initial_description_bytes.hex()) + token_address_bytes = f.read(20) + self.token_address = add_0x(token_address_bytes.hex()) + f.close() addresses = self.keystore.list()