============================= test session starts ==============================
platform darwin -- Python 3.11.14, pytest-7.4.4, pluggy-1.6.0 -- /opt/homebrew/opt/python@3.11/bin/python3.11
cachedir: .pytest_cache
rootdir: /Users/lokeshgarg/ai-mvp-backend/mcp-server-nucleus
configfile: pyproject.toml
plugins: anyio-4.12.1, asyncio-0.21.1, cov-7.0.0
asyncio: mode=Mode.STRICT
collecting ... collected 4 items

tests/test_integration.py::TestIntegration::test_brain_health PASSED     [ 25%]
tests/test_integration.py::TestIntegration::test_event_emission_reading FAILED [ 50%]
tests/test_integration.py::TestIntegration::test_session_save_resume_cycle PASSED [ 75%]
tests/test_integration.py::TestIntegration::test_task_crud_operations FAILED [100%]

=================================== FAILURES ===================================
_________________ TestIntegration.test_event_emission_reading __________________

self = <tests.test_integration.TestIntegration testMethod=test_event_emission_reading>

    def test_event_emission_reading(self):
        """AG-007: Test event pipeline (emit -> read)"""
        # 1. Emit Event
        emit_resp = nucleus._emit_event(
            event_type="test_event",
            emitter="integration_suite",
            data={"foo": "bar"},
            description="Test event for integration"
        )
>       self.assertTrue(emit_resp.get("success", True) if "success" in emit_resp else "event_id" in emit_resp)
E       AssertionError: False is not true

tests/test_integration.py:123: AssertionError
__________________ TestIntegration.test_task_crud_operations ___________________

self = <tests.test_integration.TestIntegration testMethod=test_task_crud_operations>

    def test_task_crud_operations(self):
        """AG-007: Test full task CRUD queue operations"""
        # 1. Add Task
        add_resp = nucleus._add_task(
            description="Integration Task",
            priority=1,
            required_skills=["testing"]
        )
        self.assertTrue(add_resp.get("success", True) if "success" in add_resp else "id" in add_resp)
        task_id = add_resp.get("data", add_resp).get("id", add_resp.get("id"))
    
        # 2. List Tasks
        list_resp = nucleus._list_tasks(status="PENDING")
>       self.assertTrue(list_resp.get("success", True) if "success" in list_resp else "tasks" in list_resp)
E       AssertionError: False is not true

tests/test_integration.py:96: AssertionError
=============================== warnings summary ===============================
../../../../opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:19
  /opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:19: DeprecationWarning: 'setName' deprecated - use 'set_name'
    token = pp.Word(tchar).setName("token")

../../../../opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:20
  /opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:20: DeprecationWarning: 'leaveWhitespace' deprecated - use 'leave_whitespace'
    token68 = pp.Combine(pp.Word("-._~+/" + pp.nums + pp.alphas) + pp.Optional(pp.Word("=").leaveWhitespace())).setName(

../../../../opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:20
  /opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:20: DeprecationWarning: 'setName' deprecated - use 'set_name'
    token68 = pp.Combine(pp.Word("-._~+/" + pp.nums + pp.alphas) + pp.Optional(pp.Word("=").leaveWhitespace())).setName(

../../../../opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:24
  /opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:24: DeprecationWarning: 'setName' deprecated - use 'set_name'
    quoted_string = pp.dblQuotedString.copy().setName("quoted-string").setParseAction(unquote)

../../../../opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:24
  /opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:24: DeprecationWarning: 'setParseAction' deprecated - use 'set_parse_action'
    quoted_string = pp.dblQuotedString.copy().setName("quoted-string").setParseAction(unquote)

../../../../opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:25
  /opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:25: DeprecationWarning: 'setName' deprecated - use 'set_name'
    auth_param_name = token.copy().setName("auth-param-name").addParseAction(downcaseTokens)

../../../../opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:25
  /opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:25: DeprecationWarning: 'addParseAction' deprecated - use 'add_parse_action'
    auth_param_name = token.copy().setName("auth-param-name").addParseAction(downcaseTokens)

../../../../opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:27
  /opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:27: DeprecationWarning: 'delimitedList' deprecated - use 'DelimitedList'
    params = pp.Dict(pp.delimitedList(pp.Group(auth_param)))

../../../../opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:33
  /opt/homebrew/lib/python3.11/site-packages/httplib2/auth.py:33: DeprecationWarning: 'delimitedList' deprecated - use 'DelimitedList'
    www_authenticate = pp.delimitedList(pp.Group(challenge))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_integration.py::TestIntegration::test_event_emission_reading
FAILED tests/test_integration.py::TestIntegration::test_task_crud_operations
=================== 2 failed, 2 passed, 9 warnings in 3.66s ====================
