Fixing issues in imports after movin tests to pip install -e for testlib

Signed-off-by: Aleksei Chetaev <alex.chetaev@gmail.com>
This commit is contained in:
Aleksei Chetaev 2023-02-22 15:45:36 +01:00 committed by Aleksey Chetaev
parent 4fd9d69701
commit 71b35d45c3
8 changed files with 51 additions and 55 deletions

View file

@ -7,40 +7,40 @@ class TestConverters(TestCase):
def test_str_to_ascii_hex(self):
source_str = ""
result_str = ""
self.assertEqual(converters.str_to_ascii_hex(source_str), result_str)
self.assertEqual(converting_utils.str_to_ascii_hex(source_str), result_str)
source_str = '"test_data" f0r ^convert*'
result_str = "22746573745f646174612220663072205e636f6e766572742a"
self.assertEqual(converters.str_to_ascii_hex(source_str), result_str)
self.assertEqual(converting_utils.str_to_ascii_hex(source_str), result_str)
def test_ascii_hex_to_str(self):
source_str = ""
result_bytes = b""
self.assertEqual(converters.ascii_hex_to_str(source_str), result_bytes)
self.assertEqual(converting_utils.ascii_hex_to_str(source_str), result_bytes)
source_str = "22746573745f646174612220663072205e636f6e766572742a"
result_bytes = b'"test_data" f0r ^convert*'
self.assertEqual(converters.ascii_hex_to_str(source_str), result_bytes)
self.assertEqual(converting_utils.ascii_hex_to_str(source_str), result_bytes)
def test_process_b64_bytearray_reverse(self):
source_str = ""
result_bytes = b""
self.assertEqual(converters.process_b64_bytearray_reverse(source_str), result_bytes)
self.assertEqual(converting_utils.process_b64_bytearray_reverse(source_str), result_bytes)
source_str = "InRlc3RfZGF0YSIgZjByIF5jb252ZXJ0Kg=="
result_bytes = b"2a747265766e6f635e207230662022617461645f7473657422"
self.assertEqual(converters.process_b64_bytearray_reverse(source_str), result_bytes)
self.assertEqual(converting_utils.process_b64_bytearray_reverse(source_str), result_bytes)
def test_process_b64_bytearray(self):
source_str = ""
result_bytes = b""
self.assertEqual(converters.process_b64_bytearray(source_str), result_bytes)
self.assertEqual(converting_utils.process_b64_bytearray(source_str), result_bytes)
source_str = "InRlc3RfZGF0YSIgZjByIF5jb252ZXJ0Kg=="
result_bytes = b"22746573745f646174612220663072205e636f6e766572742a"
self.assertEqual(converters.process_b64_bytearray(source_str), result_bytes)
self.assertEqual(converting_utils.process_b64_bytearray(source_str), result_bytes)
def test_contract_hash_to_address(self):
source_str = "d01a381aae45f1ed181db9d554cc5ccc69c69f4e"
result_str = "NT5hJ5peVmvYdZCsFKUM5MTcEGw5TB4k89"
self.assertEqual(converters.contract_hash_to_address(source_str), result_str)
self.assertEqual(converting_utils.contract_hash_to_address(source_str), result_str)