test descriptions
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user