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

Method test_delete_cube

tests/mem_user/test_mem_user.py:414–432  ·  view source on GitHub ↗

Test cube deletion (soft delete).

(self, user_manager)

Source from the content-addressed store, hash-verified

412 assert result is False
413
414 def test_delete_cube(self, user_manager):
415 """Test cube deletion (soft delete)."""
416 owner_id = user_manager.create_user("owner", UserRole.USER)
417 cube_id = user_manager.create_cube("test_cube", owner_id)
418
419 # Verify cube is active
420 cube = user_manager.get_cube(cube_id)
421 assert cube.is_active is True
422
423 # Delete cube
424 result = user_manager.delete_cube(cube_id)
425 assert result is True
426
427 # Verify cube is deactivated
428 cube = user_manager.get_cube(cube_id)
429 assert cube.is_active is False
430
431 # Should not have access to deactivated cube
432 assert user_manager.validate_user_cube_access(owner_id, cube_id) is False
433
434 def test_delete_nonexistent_cube(self, user_manager):
435 """Test deleting non-existent cube."""

Callers

nothing calls this directly

Calls 5

create_userMethod · 0.45
create_cubeMethod · 0.45
get_cubeMethod · 0.45
delete_cubeMethod · 0.45

Tested by

no test coverage detected