fix test_colliding_short_id
This commit is contained in:
parent
5fe339c53b
commit
01691dd92a
1 changed files with 7 additions and 1 deletions
|
@ -153,11 +153,17 @@ class ResolveCommand(BaseResolveTestCase):
|
||||||
await self.assertResolvesToClaimId(
|
await self.assertResolvesToClaimId(
|
||||||
f'@abc#{colliding_claim_ids[0][:1]}', first_claim
|
f'@abc#{colliding_claim_ids[0][:1]}', first_claim
|
||||||
)
|
)
|
||||||
|
collision_depth = 0
|
||||||
|
for c1, c2 in zip(colliding_claim_ids[0], colliding_claim_ids[1]):
|
||||||
|
if c1 == c2:
|
||||||
|
collision_depth += 1
|
||||||
|
else:
|
||||||
|
break
|
||||||
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[0][:2]}', colliding_claim_ids[0])
|
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[0][:2]}', colliding_claim_ids[0])
|
||||||
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[0][:7]}', colliding_claim_ids[0])
|
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[0][:7]}', colliding_claim_ids[0])
|
||||||
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[0][:17]}', colliding_claim_ids[0])
|
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[0][:17]}', colliding_claim_ids[0])
|
||||||
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[0]}', colliding_claim_ids[0])
|
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[0]}', colliding_claim_ids[0])
|
||||||
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[1][:3]}', colliding_claim_ids[1])
|
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[1][:collision_depth + 1]}', colliding_claim_ids[1])
|
||||||
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[1][:7]}', colliding_claim_ids[1])
|
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[1][:7]}', colliding_claim_ids[1])
|
||||||
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[1][:17]}', colliding_claim_ids[1])
|
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[1][:17]}', colliding_claim_ids[1])
|
||||||
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[1]}', colliding_claim_ids[1])
|
await self.assertResolvesToClaimId(f'@abc#{colliding_claim_ids[1]}', colliding_claim_ids[1])
|
||||||
|
|
Loading…
Add table
Reference in a new issue