MCPcopy Create free account
hub / github.com/MemTensor/MemOS / test_create_user

Method test_create_user

tests/mem_user/test_mem_user.py:116–128  ·  view source on GitHub ↗

Test user creation.

(self, user_manager)

Source from the content-addressed store, hash-verified

114 manager.close()
115
116 def test_create_user(self, user_manager):
117 """Test user creation."""
118 user_id = user_manager.create_user("test_user", UserRole.USER)
119
120 assert user_id is not None
121 assert isinstance(user_id, str)
122
123 # Verify user exists
124 user = user_manager.get_user(user_id)
125 assert user is not None
126 assert user.user_name == "test_user"
127 assert user.role == UserRole.USER
128 assert user.is_active is True
129
130 def test_create_user_with_custom_id(self, user_manager):
131 """Test user creation with custom ID."""

Callers

nothing calls this directly

Calls 2

create_userMethod · 0.45
get_userMethod · 0.45

Tested by

no test coverage detected