[{'Text': 'def test_list_operators():\n    """list_operators returns operators sorted by name, with optional limit."""\n    from bson import ObjectId\n\n    import point_topic_mcp.tools.gbs_tools as gbs\n\n    if not hasattr(gbs, "list_operators"):\n        pytest.skip("GBS tools not loaded (PT_RESEARCH_DATABASE_URI not set)")\n\n    op_id_a = ObjectId()\n    op_id_b = ObjectId()\n    op_id_c = ObjectId()\n    # Intentionally unsorted input to verify sorting is applied\n    mock_ops = [\n        {"_id": {"$oid": str(op_id_b)}, "name": "Zebra", "country": "UK", "technologies": ["FTTP"]},\n        {"_id": {"$oid": str(op_id_a)}, "name": "Alpha", "country": "UK", "technologies": ["FTTP"]},\n        {"_id": {"$oid": str(op_id_c)}, "name": "Beta", "country": "UK", "technologies": ["FTTP"]},\n    ]\n    \n    with patch("point_topic_mcp.core.mongodb_utils.find_operators", return_value=mock_ops):\n        # Test 1: basic call, should be sorted\n        result = gbs.list_operators()\n        assert "Operators:" in result\n        assert "Alpha" in result\n        assert "Beta" in result\n        assert "Zebra" in result\n        # Check ordering: Alpha should appear before Beta, Beta before Zebra\n        alpha_pos = result.find("Alpha")\n        beta_pos = result.find("Beta")\n        zebra_pos = result.find("Zebra")\n        assert alpha_pos < beta_pos < zebra_pos, "Operators should be sorted alphabetically"\n        \n        # Test 2: with limit\n        result_limited = gbs.list_operators(limit=2)\n        assert "showing 2 of 3" in result_limited\n        assert "Alpha" in result_limited\n        assert "Beta" in result_limited\n        assert "Zebra" not in result_limited\n        \n        # Test 3: with country filter\n        result_filtered = gbs.list_operators(country="UK")\n        assert "(country filter: \'UK\', 3 match(es))" in result_filtered\n\n\ndef test_get_gbs_status_operator_not_found():\n    """get_gbs_status returns error when operator doesn\'t exist."""\n    import point_topic_mcp.tools.gbs_tools as gbs\n\n    if not hasattr(gbs, "get_gbs_status"):\n        pytest.skip("GBS tools not loaded (PT_RESEARCH_DATABASE_URI not set)")\n\n    with patch("point_topic_mcp.core.mongodb_utils.find_one_operator", return_value=None):\n        result = gbs.get_gbs_status("UK", "NoSuchOperator", "2025Q1")\n        assert "Operator not found" in result\n\n\n'}]