import unittest

from eth_kms_signer.utils.address import get_address_from_pub, get_compressed_public_key


class AddressUtils(unittest.TestCase):
    pub_key = bytes.fromhex(
        "<KEY>"  # noqa
    )

    def test_get_address_from_pub_key(self):
        expected_address = get_address_from_pub(self.pub_key)
        assert expected_address == "0x539C58605e3FB9B024e8168b9F529B81586dee00"

    def test_get_compressed_pub_key(self):
        compressed = get_compressed_public_key(self.pub_key)
        assert (
            compressed.hex()
            == "<KEY>"
        )

import unittest

from eth_kms_signer.utils.address import get_address_from_pub, get_compressed_public_key


class AddressUtils(unittest.TestCase):
    pub_key = bytes.fromhex(
        "<KEY>"  # noqa
    )

    def test_get_address_from_pub_key(self):
        expected_address = get_address_from_pub(self.pub_key)
        assert expected_address == "0x539C58605e3FB9B024e8168b9F529B81586dee00"

    def test_get_compressed_pub_key(self):
        compressed = get_compressed_public_key(self.pub_key)
        assert (
            compressed.hex()
            == "<KEY>"
        )
