MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / create_test_identities

Function create_test_identities

atomic-identity/src/delegation.rs:588–596  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

586 use crate::identity::IdentityType;
587
588 fn create_test_identities() -> (Identity, Identity) {
589 let user = Identity::generate("alice");
590 let agent = Identity::builder("alice-assistant")
591 .identity_type(IdentityType::Agent)
592 .delegated_by(user.id)
593 .build()
594 .unwrap();
595 (user, agent)
596 }
597
598 #[test]
599 fn test_delegation_permission_implies() {

Callers 6

test_delegation_newFunction · 0.85
test_delegation_expiryFunction · 0.85
test_delegation_revokeFunction · 0.85
test_delegation_allowsFunction · 0.85

Calls 4

delegated_byMethod · 0.80
unwrapMethod · 0.45
buildMethod · 0.45
identity_typeMethod · 0.45

Tested by 6

test_delegation_newFunction · 0.68
test_delegation_expiryFunction · 0.68
test_delegation_revokeFunction · 0.68
test_delegation_allowsFunction · 0.68