|
|
|
@ -67,7 +67,18 @@ def test_str(identity: Identity) -> None:
|
|
|
|
|
@pytest.mark.id_key_seed(TEST_SEED)
|
|
|
|
|
@pytest.mark.id_name('test')
|
|
|
|
|
def test_repr(identity: Identity) -> None:
|
|
|
|
|
"""Test if the __str__ method returns the author address"""
|
|
|
|
|
"""Test if the __repr__ method returns the author address"""
|
|
|
|
|
|
|
|
|
|
assert (
|
|
|
|
|
repr(identity)
|
|
|
|
|
== '<Identity (signer) @test.bcz76z52y5dlpohtkmpuj3jsdcvfmebzpcgfmtmhu4u7hlexzreya>'
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_repr_nosign() -> None:
|
|
|
|
|
"""Test the __repr__ method marks the identity as a signer in the output"""
|
|
|
|
|
|
|
|
|
|
identity = Identity.from_address('@test.bcz76z52y5dlpohtkmpuj3jsdcvfmebzpcgfmtmhu4u7hlexzreya')
|
|
|
|
|
|
|
|
|
|
assert (
|
|
|
|
|
repr(identity) == '<Identity @test.bcz76z52y5dlpohtkmpuj3jsdcvfmebzpcgfmtmhu4u7hlexzreya>'
|
|
|
|
|