test descriptions

This commit is contained in:
Dobromir Popov
2026-07-11 22:25:30 +03:00
parent 7d259d7c9b
commit 7cf8d9bcf3
43 changed files with 876 additions and 265 deletions

View File

@@ -29,6 +29,7 @@ def _post_json(url: str, payload: dict) -> dict:
def test_registry_wallet_has_reputation_fields():
"Registry wallet has reputation fields\n\nTags: security, wallet"
wallet = RegistryWallet()
assert wallet.reputation == 1.0
assert wallet.last_audit_ts is None
@@ -38,6 +39,7 @@ def test_registry_wallet_has_reputation_fields():
def test_strike_survives_restart(tmp_path):
"Strike survives restart\n\nTags: general"
db = str(tmp_path / "registry.sqlite")
contracts = LocalSolanaContracts(registry_db=db)
contracts.registry.record_strike("wallet-a")
@@ -48,6 +50,7 @@ def test_strike_survives_restart(tmp_path):
def test_ban_stake_and_jobs_survive_restart(tmp_path):
"Ban stake and jobs survive restart\n\nTags: general"
db = str(tmp_path / "registry.sqlite")
contracts = LocalSolanaContracts(registry_db=db)
contracts.registry.submit_stake("wallet-b", 500)
@@ -68,6 +71,7 @@ def test_ban_stake_and_jobs_survive_restart(tmp_path):
def test_reputation_and_audit_ts_survive_restart(tmp_path):
"Reputation and audit ts survive restart\n\nTags: general"
db = str(tmp_path / "registry.sqlite")
contracts = LocalSolanaContracts(registry_db=db)
contracts.registry.set_reputation("wallet-c", 0.8)
@@ -84,6 +88,7 @@ def test_reputation_and_audit_ts_survive_restart(tmp_path):
def test_registry_events_replicate_between_instances():
"Registry events replicate between instances\n\nTags: general"
a = LocalSolanaContracts()
b = LocalSolanaContracts()
a.registry.record_strike("wallet-d")
@@ -103,6 +108,7 @@ def test_registry_events_replicate_between_instances():
def test_banned_wallet_rejected_at_registration_after_restart(tmp_path):
"Banned wallet rejected at registration after restart\n\nTags: security, wallet"
db = str(tmp_path / "registry.sqlite")
contracts = LocalSolanaContracts(registry_db=db)
contracts.registry.ban_wallet("wallet-evil")