Tests for session_api