@@ -524,19 +524,15 @@ def test_get_reputation_returns_verification_level():
524524
525525@respx .mock
526526def test_get_reputation_omits_verification_level_when_absent ():
527- respx .get (f"{ BASE_URL } /v1/reputation/{ ADDRESS } " ).mock (
528- return_value = httpx .Response (200 , json = REPUTATION_PAYLOAD )
529- )
527+ respx .get (f"{ BASE_URL } /v1/reputation/{ ADDRESS } " ).mock (return_value = httpx .Response (200 , json = REPUTATION_PAYLOAD ))
530528 client = AgentScore (api_key = API_KEY )
531529 result = client .get_reputation (ADDRESS )
532530 assert "verification_level" not in result
533531
534532
535533@respx .mock
536534def test_assess_returns_operator_verification ():
537- respx .post (f"{ BASE_URL } /v1/assess" ).mock (
538- return_value = httpx .Response (200 , json = ASSESS_WITH_COMPLIANCE )
539- )
535+ respx .post (f"{ BASE_URL } /v1/assess" ).mock (return_value = httpx .Response (200 , json = ASSESS_WITH_COMPLIANCE ))
540536 client = AgentScore (api_key = API_KEY )
541537 result = client .assess (ADDRESS )
542538 assert result ["operator_verification" ]["level" ] == "none"
@@ -545,29 +541,23 @@ def test_assess_returns_operator_verification():
545541
546542@respx .mock
547543def test_assess_returns_verify_url ():
548- respx .post (f"{ BASE_URL } /v1/assess" ).mock (
549- return_value = httpx .Response (200 , json = ASSESS_WITH_COMPLIANCE )
550- )
544+ respx .post (f"{ BASE_URL } /v1/assess" ).mock (return_value = httpx .Response (200 , json = ASSESS_WITH_COMPLIANCE ))
551545 client = AgentScore (api_key = API_KEY )
552546 result = client .assess (ADDRESS )
553547 assert result ["verify_url" ] == "https://agentscore.sh/verify/abc123"
554548
555549
556550@respx .mock
557551def test_assess_returns_resolved_operator ():
558- respx .post (f"{ BASE_URL } /v1/assess" ).mock (
559- return_value = httpx .Response (200 , json = ASSESS_WITH_COMPLIANCE )
560- )
552+ respx .post (f"{ BASE_URL } /v1/assess" ).mock (return_value = httpx .Response (200 , json = ASSESS_WITH_COMPLIANCE ))
561553 client = AgentScore (api_key = API_KEY )
562554 result = client .assess (ADDRESS )
563555 assert result ["resolved_operator" ] == "0xoperator456"
564556
565557
566558@respx .mock
567559def test_assess_omits_verification_fields_when_absent ():
568- respx .post (f"{ BASE_URL } /v1/assess" ).mock (
569- return_value = httpx .Response (200 , json = ASSESS_PAYLOAD )
570- )
560+ respx .post (f"{ BASE_URL } /v1/assess" ).mock (return_value = httpx .Response (200 , json = ASSESS_PAYLOAD ))
571561 client = AgentScore (api_key = API_KEY )
572562 result = client .assess (ADDRESS )
573563 assert "operator_verification" not in result
@@ -577,9 +567,7 @@ def test_assess_omits_verification_fields_when_absent():
577567
578568@respx .mock
579569def test_assess_sends_compliance_policy_fields ():
580- route = respx .post (f"{ BASE_URL } /v1/assess" ).mock (
581- return_value = httpx .Response (200 , json = ASSESS_PAYLOAD )
582- )
570+ route = respx .post (f"{ BASE_URL } /v1/assess" ).mock (return_value = httpx .Response (200 , json = ASSESS_PAYLOAD ))
583571 client = AgentScore (api_key = API_KEY )
584572 policy = {
585573 "require_kyc" : True ,
@@ -612,9 +600,7 @@ async def test_aget_reputation_returns_verification_level():
612600@pytest .mark .asyncio
613601@respx .mock
614602async def test_aassess_returns_compliance_fields ():
615- respx .post (f"{ BASE_URL } /v1/assess" ).mock (
616- return_value = httpx .Response (200 , json = ASSESS_WITH_COMPLIANCE )
617- )
603+ respx .post (f"{ BASE_URL } /v1/assess" ).mock (return_value = httpx .Response (200 , json = ASSESS_WITH_COMPLIANCE ))
618604 client = AgentScore (api_key = API_KEY )
619605 result = await client .aassess (ADDRESS )
620606 assert result ["operator_verification" ]["level" ] == "none"
@@ -644,9 +630,7 @@ def test_full_compliance_deny_flow():
644630 },
645631 "verify_url" : "https://agentscore.sh/verify/xyz789" ,
646632 }
647- route = respx .post (f"{ BASE_URL } /v1/assess" ).mock (
648- return_value = httpx .Response (200 , json = compliance_response )
649- )
633+ route = respx .post (f"{ BASE_URL } /v1/assess" ).mock (return_value = httpx .Response (200 , json = compliance_response ))
650634 client = AgentScore (api_key = API_KEY )
651635 result = client .assess (
652636 ADDRESS ,
0 commit comments