repo_id
stringclasses
409 values
prefix
large_stringlengths
34
36.3k
target
large_stringlengths
1
498
assertion_type
stringclasses
31 values
difficulty
stringclasses
8 values
test_file
stringlengths
10
121
test_function
stringlengths
1
104
test_class
stringlengths
0
51
lineno
int32
2
11.3k
commit_idx
int32
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core import constants class TestAudioVerbDefaults: def test_length_default_is_valid(self): assert "default" in
constants.AUDIO_LENGTHS.names
assert
complex_expr
tests/cli/test_verbs_defaults.py
test_length_default_is_valid
TestAudioVerbDefaults
21
null
jacob-bd/notebooklm-mcp-cli
from notebooklm_tools.core.errors import ( NotebookLMError, ArtifactError, ArtifactNotReadyError, ArtifactParseError, ArtifactDownloadError, ArtifactNotFoundError, ClientAuthenticationError, ) def test_artifact_not_found_error(): """Test ArtifactNotFoundError stores artifact info.""" ...
"report"
assert
string_literal
tests/core/test_errors.py
test_artifact_not_found_error
49
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_notes_mixin_import(): """Test that NotesMixin can be imported.""" from notebooklm_tools.core.notes import NotesMixin assert NotesMixin is not
None
assert
none_literal
tests/core/test_notes.py
test_notes_mixin_import
10
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from types import SimpleNamespace from notebooklm_tools.services.notebooks import ( list_notebooks, get_notebook, describe_notebook, create_notebook, rename_notebook, delete_notebook, ) from notebooklm_tools.services.errors import ( ServiceE...
"nb-new"
assert
string_literal
tests/services/test_notebooks.py
test_successful_creation
TestCreateNotebook
163
null
jacob-bd/notebooklm-mcp-cli
import json import pytest from unittest.mock import MagicMock, patch from notebooklm_tools.services.studio import ( validate_artifact_type, resolve_code, create_artifact, get_studio_status, rename_artifact, delete_artifact, VALID_ARTIFACT_TYPES, ) from notebooklm_tools.services.errors impo...
"art-4"
assert
string_literal
tests/services/test_studio.py
test_create_slide_deck
TestCreateArtifact
110
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.notes import ( list_notes, create_note, update_note, delete_note, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestUpdateNote: def test...
True
assert
bool_literal
tests/services/test_notes.py
test_update_content
TestUpdateNote
104
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock, AsyncMock from notebooklm_tools.services.downloads import ( validate_artifact_type, validate_output_format, get_default_extension, download_sync, download_async, VALID_ARTIFACT_TYPES, VALID_OUTPUT_FORMATS, ) from notebooklm_tools.services.e...
"m4a"
assert
string_literal
tests/services/test_downloads.py
test_audio_extension
TestGetDefaultExtension
63
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.chat import query, configure_chat from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestQuery: def test_api_error_raises_service_error(self, mock_client): ...
ServiceError, match="Query failed")
pytest.raises
complex_expr
tests/services/test_chat.py
test_api_error_raises_service_error
TestQuery
48
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.sources import ( validate_source_type, resolve_drive_mime_type, add_source, add_sources, list_drive_sources, sync_drive_sources, delete_source, delete_sources, describe_source, get_source_content, ...
"text"
assert
string_literal
tests/services/test_sources.py
test_add_text_source
TestAddSource
90
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.exports import export_artifact, ExportResult from notebooklm_tools.services.errors import ValidationError, ExportError def mock_client(): """Create a mock NotebookLMClient.""" return MagicMock() class TestExportArtifactFailure: ...
ExportError, match="no document URL")
pytest.raises
complex_expr
tests/services/test_exports.py
test_no_url_raises_export_error
TestExportArtifactFailure
147
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.notes import ( list_notes, create_note, update_note, delete_note, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestCreateNote: def test...
result["content_preview"]
assert
complex_expr
tests/services/test_notes.py
test_successful_creation
TestCreateNote
59
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.exports import export_artifact, ExportResult from notebooklm_tools.services.errors import ValidationError, ExportError def mock_client(): """Create a mock NotebookLMClient.""" return MagicMock() class TestExportArtifactFailure: ...
ExportError, match="API call failed")
pytest.raises
complex_expr
tests/services/test_exports.py
test_api_exception_wrapped_in_export_error
TestExportArtifactFailure
180
null
jacob-bd/notebooklm-mcp-cli
from unittest.mock import patch import pytest from notebooklm_tools.core.client import NotebookLMClient def mock_client(): cookies = {"SID": "test_sid"} with patch.object(NotebookLMClient, '_refresh_auth_tokens'): client = NotebookLMClient(cookies=cookies, csrf_token="old_token", session_id="old_sid"...
None
assert
none_literal
tests/test_research_polling.py
test_poll_research_filtering
TestNotebookLMClientFiltering
48
null
jacob-bd/notebooklm-mcp-cli
from unittest.mock import patch, MagicMock import pytest def test_get_httpx_cookies_from_dict(): """Test converting dict cookies to httpx.Cookies.""" from notebooklm_tools.core.base import BaseClient with patch.object(BaseClient, '_refresh_auth_tokens'): client = BaseClient(cookies={"SID": "ab...
"abc123"
assert
string_literal
tests/core/test_base.py
test_get_httpx_cookies_from_dict
67
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_create_note_calls_rpc(): """Test that create_note calls the correct RPC.""" from notebooklm_tools.core.notes import NotesMixin with patch.object(NotesMixin, '_refresh_auth_tokens'): with patch.object(NotesMixin, '_call_rpc') as mock...
"note_id_123"
assert
string_literal
tests/core/test_notes.py
test_create_note_calls_rpc
59
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.chat import query, configure_chat from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestConfigureChat: def test_successful_default_config(self, mock_client): ...
result["message"].lower()
assert
func_call
tests/services/test_chat.py
test_successful_default_config
TestConfigureChat
84
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.sources import ( validate_source_type, resolve_drive_mime_type, add_source, add_sources, list_drive_sources, sync_drive_sources, delete_source, delete_sources, describe_source, get_source_content, ...
0
assert
numeric_literal
tests/services/test_sources.py
test_fresh_sources
TestListDriveSources
168
null
jacob-bd/notebooklm-mcp-cli
import json import pytest from unittest.mock import MagicMock, patch from notebooklm_tools.services.studio import ( validate_artifact_type, resolve_code, create_artifact, get_studio_status, rename_artifact, delete_artifact, VALID_ARTIFACT_TYPES, ) from notebooklm_tools.services.errors impo...
"mm-1"
assert
string_literal
tests/services/test_studio.py
test_create_mind_map
TestCreateArtifact
142
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.chat import query, configure_chat from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestQuery: def test_successful_query(self, mock_client): mock_clie...
"conv-123"
assert
string_literal
tests/services/test_chat.py
test_successful_query
TestQuery
29
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock, AsyncMock from notebooklm_tools.services.downloads import ( validate_artifact_type, validate_output_format, get_default_extension, download_sync, download_async, VALID_ARTIFACT_TYPES, VALID_OUTPUT_FORMATS, ) from notebooklm_tools.services.e...
"audio"
assert
string_literal
tests/services/test_downloads.py
test_download_audio
TestDownloadAsync
122
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.research import ( start_research, poll_research, import_research, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestStartResearch: def test_...
ServiceError, match="no data")
pytest.raises
complex_expr
tests/services/test_research.py
test_falsy_result_raises_service_error
TestStartResearch
53
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_notebook_mixin_import(): """Test that NotebookMixin can be imported.""" from notebooklm_tools.core.notebooks import NotebookMixin assert NotebookMixin is not
None
assert
none_literal
tests/core/test_notebooks.py
test_notebook_mixin_import
10
null
jacob-bd/notebooklm-mcp-cli
from notebooklm_tools.core.exceptions import AccountMismatchError, NLMError class TestSaveProfileMismatchGuard: def _create_existing_profile(self, tmp_path: Path, email: str) -> AuthManager: """Helper: create a profile with existing credentials on disk.""" profiles_dir = tmp_path / "profiles" / "t...
str(exc_info.value)
assert
func_call
tests/core/test_auth_guard.py
test_save_blocks_when_email_differs
TestSaveProfileMismatchGuard
75
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.sources import ( validate_source_type, resolve_drive_mime_type, add_source, add_sources, list_drive_sources, sync_drive_sources, delete_source, delete_sources, describe_source, get_source_content, ...
1
assert
numeric_literal
tests/services/test_sources.py
test_returns_categorized_sources
TestListDriveSources
156
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_list_notes_filters_mind_maps(): """Test that list_notes filters out mind maps.""" from notebooklm_tools.core.notes import NotesMixin with patch.object(NotesMixin, '_refresh_auth_tokens'): with patch.object(NotesMixin, '_call_rpc') a...
"Note Title"
assert
string_literal
tests/core/test_notes.py
test_list_notes_filters_mind_maps
85
null
jacob-bd/notebooklm-mcp-cli
import json import pytest from unittest.mock import patch from notebooklm_tools.core.base import BaseClient from notebooklm_tools.core.conversation import ConversationMixin, QueryRejectedError class TestConversationMixinMethods: def test_extract_source_ids_from_notebook_handles_none(self): """Test that ...
[]
assert
collection
tests/core/test_conversation.py
test_extract_source_ids_from_notebook_handles_none
TestConversationMixinMethods
97
null
jacob-bd/notebooklm-mcp-cli
import tempfile from pathlib import Path from unittest.mock import patch, MagicMock import pytest class TestMCPSourceAddFile: def test_source_add_file_calls_client(self): """Test that source_add file type calls client.add_file correctly.""" from notebooklm_tools.mcp.tools import sources f...
"success"
assert
string_literal
tests/test_mcp_file_upload.py
test_source_add_file_calls_client
TestMCPSourceAddFile
52
null
jacob-bd/notebooklm-mcp-cli
import contextlib import os import time from pathlib import Path import pytest pytestmark = pytest.mark.skipif( not os.environ.get("NOTEBOOKLM_E2E"), reason="E2E tests disabled. Set NOTEBOOKLM_E2E=1 to run." ) def client(): """Create a client with cached credentials.""" from notebooklm_tools.core.aut...
notebook.title
assert
complex_expr
tests/test_e2e.py
test_create_and_delete_notebook
TestNotebookOperations
70
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.sources import ( validate_source_type, resolve_drive_mime_type, add_source, add_sources, list_drive_sources, sync_drive_sources, delete_source, delete_sources, describe_source, get_source_content, ...
"s2"
assert
string_literal
tests/services/test_sources.py
test_returns_categorized_sources
TestListDriveSources
158
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from types import SimpleNamespace from notebooklm_tools.services.notebooks import ( list_notebooks, get_notebook, describe_notebook, create_notebook, rename_notebook, delete_notebook, ) from notebooklm_tools.services.errors import ( ServiceE...
"src-1"
assert
string_literal
tests/services/test_notebooks.py
test_raw_rpc_list_parsed
TestGetNotebook
108
null
jacob-bd/notebooklm-mcp-cli
import json import pytest from unittest.mock import MagicMock, patch from notebooklm_tools.services.studio import ( validate_artifact_type, resolve_code, create_artifact, get_studio_status, rename_artifact, delete_artifact, VALID_ARTIFACT_TYPES, ) from notebooklm_tools.services.errors impo...
"art-5"
assert
string_literal
tests/services/test_studio.py
test_create_report
TestCreateArtifact
115
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from dataclasses import dataclass from notebooklm_tools.services.sharing import ( get_share_status, set_public_access, invite_collaborator, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock...
"nb-123"
assert
string_literal
tests/services/test_sharing.py
test_returns_correct_structure
TestGetShareStatus
52
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.chat import query, configure_chat from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestConfigureChat: def test_shorter_response_length_works(self, mock_clien...
"shorter"
assert
string_literal
tests/services/test_chat.py
test_shorter_response_length_works
TestConfigureChat
130
null
jacob-bd/notebooklm-mcp-cli
import contextlib import os import time from pathlib import Path import pytest pytestmark = pytest.mark.skipif( not os.environ.get("NOTEBOOKLM_E2E"), reason="E2E tests disabled. Set NOTEBOOKLM_E2E=1 to run." ) def client(): """Create a client with cached credentials.""" from notebooklm_tools.core.aut...
None
assert
none_literal
tests/test_e2e.py
test_notebook
45
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, Mock import sys from notebooklm_tools.cli.formatters import detect_output_format, OutputFormat def test_detect_output_format_json_flag(): # Flag takes precedence assert detect_output_format(json_flag=True) ==
OutputFormat.JSON
assert
complex_expr
tests/cli/test_formatters.py
test_detect_output_format_json_flag
9
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.exports import export_artifact, ExportResult from notebooklm_tools.services.errors import ValidationError, ExportError def mock_client(): """Create a mock NotebookLMClient.""" return MagicMock() class TestExportArtifactValidatio...
"docs"
assert
string_literal
tests/services/test_exports.py
test_export_type_case_insensitive
TestExportArtifactValidation
40
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from types import SimpleNamespace from notebooklm_tools.services.notebooks import ( list_notebooks, get_notebook, describe_notebook, create_notebook, rename_notebook, delete_notebook, ) from notebooklm_tools.services.errors import ( ServiceE...
"New Title"
assert
string_literal
tests/services/test_notebooks.py
test_successful_rename
TestRenameNotebook
186
null
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core import constants class TestReportVerbDefaults: def test_format_default_is_valid(self): assert "Briefing Doc" ==
constants.REPORT_FORMAT_BRIEFING_DOC
assert
complex_expr
tests/cli/test_verbs_defaults.py
test_format_default_is_valid
TestReportVerbDefaults
38
null
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core.base import BaseClient from notebooklm_tools.core.download import DownloadMixin class TestDownloadMixinMethods: def test_extract_cell_text_handles_string(self): """Test that _extract_cell_text handles string input.""" result = DownloadMixin._extract_cell_t...
"test value"
assert
string_literal
tests/core/test_download.py
test_extract_cell_text_handles_string
TestDownloadMixinMethods
76
null
jacob-bd/notebooklm-mcp-cli
from notebooklm_tools.core.data_types import ( ConversationTurn, Collaborator, ShareStatus, Notebook, ) def test_conversation_turn(): turn = ConversationTurn(query="What is AI?", answer="AI is...", turn_number=1) assert turn.query ==
"What is AI?"
assert
string_literal
tests/core/test_data_types.py
test_conversation_turn
10
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from types import SimpleNamespace from notebooklm_tools.services.notebooks import ( list_notebooks, get_notebook, describe_notebook, create_notebook, rename_notebook, delete_notebook, ) from notebooklm_tools.services.errors import ( ServiceE...
1
assert
numeric_literal
tests/services/test_notebooks.py
test_returns_notebooks_with_counts
TestListNotebooks
59
null
jacob-bd/notebooklm-mcp-cli
import contextlib import os import time from pathlib import Path import pytest pytestmark = pytest.mark.skipif( not os.environ.get("NOTEBOOKLM_E2E"), reason="E2E tests disabled. Set NOTEBOOKLM_E2E=1 to run." ) def client(): """Create a client with cached credentials.""" from notebooklm_tools.core.aut...
result.stdout.lower()
assert
func_call
tests/test_e2e.py
test_cli_help
TestCLIIntegration
196
null
jacob-bd/notebooklm-mcp-cli
import tempfile from pathlib import Path from unittest.mock import Mock, patch, MagicMock import pytest import httpx from notebooklm_tools.core.exceptions import FileValidationError, FileUploadError class TestAddFileIntegration: def test_add_file_orchestrates_three_steps(self): """Test that add_file cor...
temp_path.name)
assert_*
complex_expr
tests/test_file_upload.py
test_add_file_orchestrates_three_steps
TestAddFileIntegration
260
null
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core import constants class TestInfographicVerbDefaults: def test_detail_default_is_valid(self): assert "standard" in
constants.INFOGRAPHIC_DETAILS.names
assert
complex_expr
tests/cli/test_verbs_defaults.py
test_detail_default_is_valid
TestInfographicVerbDefaults
58
null
jacob-bd/notebooklm-mcp-cli
import pytest import httpx from unittest.mock import Mock, patch from notebooklm_tools.core.retry import ( is_retryable_error, execute_with_retry, retry_on_server_error, DEFAULT_MAX_RETRIES, DEFAULT_BASE_DELAY ) def mock_sleep(): with patch("time.sleep") as mock: yield mock def test_is...
True
assert
bool_literal
tests/core/test_retry.py
test_is_retryable_error
29
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.research import ( start_research, poll_research, import_research, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestStartResearch: def test_...
"drive"
assert
string_literal
tests/services/test_research.py
test_drive_fast_works
TestStartResearch
66
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.notes import ( list_notes, create_note, update_note, delete_note, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestListNotes: def test_...
2
assert
numeric_literal
tests/services/test_notes.py
test_returns_notes_and_count
TestListNotes
32
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.sources import ( validate_source_type, resolve_drive_mime_type, add_source, add_sources, list_drive_sources, sync_drive_sources, delete_source, delete_sources, describe_source, get_source_content, ...
True
assert
bool_literal
tests/services/test_sources.py
test_stale_count
TestListDriveSources
164
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from dataclasses import dataclass from notebooklm_tools.services.sharing import ( get_share_status, set_public_access, invite_collaborator, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock...
True
assert
bool_literal
tests/services/test_sharing.py
test_returns_correct_structure
TestGetShareStatus
53
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.chat import query, configure_chat from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestConfigureChat: def test_successful_default_config(self, mock_client): ...
"default"
assert
string_literal
tests/services/test_chat.py
test_successful_default_config
TestConfigureChat
82
null
jacob-bd/notebooklm-mcp-cli
import pytest import httpx from unittest.mock import Mock, patch from notebooklm_tools.core.retry import ( is_retryable_error, execute_with_retry, retry_on_server_error, DEFAULT_MAX_RETRIES, DEFAULT_BASE_DELAY ) def mock_sleep(): with patch("time.sleep") as mock: yield mock def test_ex...
3
assert
numeric_literal
tests/core/test_retry.py
test_execute_with_retry_failure_then_success
56
null
jacob-bd/notebooklm-mcp-cli
import tempfile from pathlib import Path from unittest.mock import patch, MagicMock import pytest class TestMCPSourceAddFile: def test_source_add_file_requires_path(self): """Test that file_path is required for source_type=file.""" from notebooklm_tools.mcp.tools import sources result = ...
"error"
assert
string_literal
tests/test_mcp_file_upload.py
test_source_add_file_requires_path
TestMCPSourceAddFile
68
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.exports import export_artifact, ExportResult from notebooklm_tools.services.errors import ValidationError, ExportError def mock_client(): """Create a mock NotebookLMClient.""" return MagicMock() class TestExportArtifactValidatio...
"success"
assert
string_literal
tests/services/test_exports.py
test_export_type_case_insensitive
TestExportArtifactValidation
39
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from dataclasses import dataclass from notebooklm_tools.services.sharing import ( get_share_status, set_public_access, invite_collaborator, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock...
0
assert
numeric_literal
tests/services/test_sharing.py
test_empty_collaborators
TestGetShareStatus
90
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock, AsyncMock from notebooklm_tools.services.downloads import ( validate_artifact_type, validate_output_format, get_default_extension, download_sync, download_async, VALID_ARTIFACT_TYPES, VALID_OUTPUT_FORMATS, ) from notebooklm_tools.services.e...
ValidationError, match="Unknown")
pytest.raises
complex_expr
tests/services/test_downloads.py
test_invalid_type_raises_validation_error
TestDownloadSync
98
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_sharing_mixin_import(): """Test that SharingMixin can be imported.""" from notebooklm_tools.core.sharing import SharingMixin assert SharingMixin is not
None
assert
none_literal
tests/core/test_sharing.py
test_sharing_mixin_import
10
null
jacob-bd/notebooklm-mcp-cli
import tempfile from pathlib import Path from unittest.mock import Mock, patch, MagicMock import pytest import httpx from notebooklm_tools.core.exceptions import FileValidationError, FileUploadError class TestAddFileIntegration: def test_add_file_orchestrates_three_steps(self): """Test that add_file cor...
temp_path.name
assert
complex_expr
tests/test_file_upload.py
test_add_file_orchestrates_three_steps
TestAddFileIntegration
266
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.research import ( start_research, poll_research, import_research, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestPollResearch: def test_n...
0
assert
numeric_literal
tests/services/test_research.py
test_no_research_returns_empty
TestPollResearch
93
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from dataclasses import dataclass from notebooklm_tools.services.sharing import ( get_share_status, set_public_access, invite_collaborator, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock...
"Alice"
assert
string_literal
tests/services/test_sharing.py
test_collaborator_details_preserved
TestGetShareStatus
79
null
jacob-bd/notebooklm-mcp-cli
import json import pytest from unittest.mock import MagicMock, patch from notebooklm_tools.services.studio import ( validate_artifact_type, resolve_code, create_artifact, get_studio_status, rename_artifact, delete_artifact, VALID_ARTIFACT_TYPES, ) from notebooklm_tools.services.errors impo...
"Root"
assert
string_literal
tests/services/test_studio.py
test_create_mind_map
TestCreateArtifact
143
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_source_mixin_import(): """Test that SourceMixin can be imported.""" from notebooklm_tools.core.sources import SourceMixin assert SourceMixin is not
None
assert
none_literal
tests/core/test_sources.py
test_source_mixin_import
10
null
jacob-bd/notebooklm-mcp-cli
import tempfile from pathlib import Path from unittest.mock import patch, MagicMock import pytest class TestMCPSourceAddFile: def test_source_add_file_requires_path(self): """Test that file_path is required for source_type=file.""" from notebooklm_tools.mcp.tools import sources result = ...
result["error"]
assert
complex_expr
tests/test_mcp_file_upload.py
test_source_add_file_requires_path
TestMCPSourceAddFile
69
null
jacob-bd/notebooklm-mcp-cli
from unittest.mock import patch, MagicMock import pytest def test_build_url(): """Test building batchexecute URL.""" from notebooklm_tools.core.base import BaseClient with patch.object(BaseClient, '_refresh_auth_tokens'): client = BaseClient(cookies={}, csrf_token="test_token", session_id="tes...
url
assert
variable
tests/core/test_base.py
test_build_url
54
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.research import ( start_research, poll_research, import_research, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestPollResearch: def test_c...
6
assert
numeric_literal
tests/services/test_research.py
test_compact_limits_sources
TestPollResearch
119
null
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core import constants class TestSlidesVerbDefaults: def test_format_default_is_valid(self): assert "detailed_deck" in
constants.SLIDE_DECK_FORMATS.names
assert
complex_expr
tests/cli/test_verbs_defaults.py
test_format_default_is_valid
TestSlidesVerbDefaults
45
null
jacob-bd/notebooklm-mcp-cli
import pytest import json from unittest.mock import MagicMock, patch import httpx from notebooklm_tools.core.client import NotebookLMClient, AuthenticationError def mock_client(): cookies = {"SID": "test_sid"} with patch.object(NotebookLMClient, '_refresh_auth_tokens') as mock_refresh: client = Noteboo...
2
assert
numeric_literal
tests/test_api_client.py
test_auto_retry_on_401
TestNotebookLMClientAuth
70
null
jacob-bd/notebooklm-mcp-cli
from notebooklm_tools.core.exceptions import AccountMismatchError, NLMError class TestBuildLabelExtraction: def test_extract_build_label_missing(self): """extract_build_label returns empty string when key is absent.""" from notebooklm_tools.utils.cdp import extract_build_label assert ext...
""
assert
string_literal
tests/core/test_auth_guard.py
test_extract_build_label_missing
TestBuildLabelExtraction
166
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.chat import query, configure_chat from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestQuery: def test_falsy_result_raises_service_error(self, mock_client): ...
ServiceError, match="empty result")
pytest.raises
complex_expr
tests/services/test_chat.py
test_falsy_result_raises_service_error
TestQuery
43
null
jacob-bd/notebooklm-mcp-cli
from notebooklm_tools.core.exceptions import AccountMismatchError, NLMError def test_account_mismatch_error_contains_both_emails(): """Error message should contain both the stored and new emails.""" err = AccountMismatchError( stored_email="work@company.com", new_email="personal@gmail.com", ...
str(err)
assert
func_call
tests/core/test_auth_guard.py
test_account_mismatch_error_contains_both_emails
18
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_delete_notebook_uses_correct_rpc(): """Test that delete_notebook calls the correct RPC.""" from notebooklm_tools.core.notebooks import NotebookMixin with patch.object(NotebookMixin, '_refresh_auth_tokens'): with patch.object(Not...
"WWINqb"
assert
string_literal
tests/core/test_notebooks.py
test_delete_notebook_uses_correct_rpc
99
null
jacob-bd/notebooklm-mcp-cli
import tempfile from pathlib import Path from unittest.mock import Mock, patch, MagicMock import pytest import httpx from notebooklm_tools.core.exceptions import FileValidationError, FileUploadError class TestFileValidation: def test_empty_file_raises_error(self): """Test that empty file raises FileVali...
FileValidationError, match="empty")
pytest.raises
complex_expr
tests/test_file_upload.py
test_empty_file_raises_error
TestFileValidation
43
null
jacob-bd/notebooklm-mcp-cli
import os import time import pytest pytestmark = pytest.mark.skipif( not os.environ.get("NOTEBOOKLM_E2E"), reason="E2E tests disabled. Set NOTEBOOKLM_E2E=1 to run." ) def mcp_tools(): """Import all MCP tools and reset client for fresh auth.""" # Reset cached client to pick up fresh auth tokens fro...
"error"
assert
string_literal
tests/test_mcp_e2e.py
test_source_add_invalid_type
TestMCPConsolidatedSourceAdd
139
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.sources import ( validate_source_type, resolve_drive_mime_type, add_source, add_sources, list_drive_sources, sync_drive_sources, delete_source, delete_sources, describe_source, get_source_content, ...
"file"
assert
string_literal
tests/services/test_sources.py
test_add_file_source
TestAddSource
111
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock, AsyncMock from notebooklm_tools.services.downloads import ( validate_artifact_type, validate_output_format, get_default_extension, download_sync, download_async, VALID_ARTIFACT_TYPES, VALID_OUTPUT_FORMATS, ) from notebooklm_tools.services.e...
"report"
assert
string_literal
tests/services/test_downloads.py
test_download_report
TestDownloadSync
86
null
jacob-bd/notebooklm-mcp-cli
import pytest import httpx from unittest.mock import Mock, patch from notebooklm_tools.core.retry import ( is_retryable_error, execute_with_retry, retry_on_server_error, DEFAULT_MAX_RETRIES, DEFAULT_BASE_DELAY ) def mock_sleep(): with patch("time.sleep") as mock: yield mock def test_ex...
1
assert
numeric_literal
tests/core/test_retry.py
test_execute_with_retry_success
44
null
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core import constants class TestAudioVerbDefaults: def test_format_default_is_valid(self): assert "deep_dive" in
constants.AUDIO_FORMATS.names
assert
complex_expr
tests/cli/test_verbs_defaults.py
test_format_default_is_valid
TestAudioVerbDefaults
18
null
jacob-bd/notebooklm-mcp-cli
import pytest import json from unittest.mock import MagicMock, patch import httpx from notebooklm_tools.core.client import NotebookLMClient, AuthenticationError def mock_client(): cookies = {"SID": "test_sid"} with patch.object(NotebookLMClient, '_refresh_auth_tokens') as mock_refresh: client = Noteboo...
1
assert
numeric_literal
tests/test_api_client.py
test_get_notebook_sources_extracts_url
TestNotebookLMClientAuth
188
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.chat import query, configure_chat from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestConfigureChat: def test_prompt_too_long_raises_validation_error(self, ...
ValidationError, match="10000 character")
pytest.raises
complex_expr
tests/services/test_chat.py
test_prompt_too_long_raises_validation_error
TestConfigureChat
107
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.notes import ( list_notes, create_note, update_note, delete_note, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestCreateNote: def test...
"New Note")
assert_*
string_literal
tests/services/test_notes.py
test_default_title_used
TestCreateNote
83
null
jacob-bd/notebooklm-mcp-cli
import os import time import pytest pytestmark = pytest.mark.skipif( not os.environ.get("NOTEBOOKLM_E2E"), reason="E2E tests disabled. Set NOTEBOOKLM_E2E=1 to run." ) def mcp_tools(): """Import all MCP tools and reset client for fresh auth.""" # Reset cached client to pick up fresh auth tokens fro...
True
assert
bool_literal
tests/test_mcp_e2e.py
test_notebook_share_public_toggle
TestMCPSharingTools
242
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from dataclasses import dataclass from notebooklm_tools.services.sharing import ( get_share_status, set_public_access, invite_collaborator, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock...
2
assert
numeric_literal
tests/services/test_sharing.py
test_returns_correct_structure
TestGetShareStatus
56
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from dataclasses import dataclass from notebooklm_tools.services.sharing import ( get_share_status, set_public_access, invite_collaborator, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock...
"editor"
assert
string_literal
tests/services/test_sharing.py
test_valid_editor_role
TestInviteCollaborator
142
null
jacob-bd/notebooklm-mcp-cli
from notebooklm_tools.core.data_types import ( ConversationTurn, Collaborator, ShareStatus, Notebook, ) def test_collaborator(): collab = Collaborator(email="test@example.com", role="editor") assert collab.role ==
"editor"
assert
string_literal
tests/core/test_data_types.py
test_collaborator
14
null
jacob-bd/notebooklm-mcp-cli
import contextlib import os import time from pathlib import Path import pytest pytestmark = pytest.mark.skipif( not os.environ.get("NOTEBOOKLM_E2E"), reason="E2E tests disabled. Set NOTEBOOKLM_E2E=1 to run." ) def client(): """Create a client with cached credentials.""" from notebooklm_tools.core.aut...
True
assert
bool_literal
tests/test_e2e.py
test_create_and_delete_notebook
TestNotebookOperations
74
null
jacob-bd/notebooklm-mcp-cli
import pytest import json from unittest.mock import MagicMock, patch import httpx from notebooklm_tools.core.client import NotebookLMClient, AuthenticationError def mock_client(): cookies = {"SID": "test_sid"} with patch.object(NotebookLMClient, '_refresh_auth_tokens') as mock_refresh: client = Noteboo...
"web_page"
assert
string_literal
tests/test_api_client.py
test_get_notebook_sources_extracts_url
TestNotebookLMClientAuth
191
null
jacob-bd/notebooklm-mcp-cli
import contextlib import os import time from pathlib import Path import pytest pytestmark = pytest.mark.skipif( not os.environ.get("NOTEBOOKLM_E2E"), reason="E2E tests disabled. Set NOTEBOOKLM_E2E=1 to run." ) def client(): """Create a client with cached credentials.""" from notebooklm_tools.core.aut...
0
assert
numeric_literal
tests/test_e2e.py
test_cli_help
TestCLIIntegration
195
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.research import ( start_research, poll_research, import_research, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestImportResearch: def test...
[{"title": "B"}]
assert
collection
tests/services/test_research.py
test_import_selected_indices
TestImportResearch
155
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from dataclasses import dataclass from notebooklm_tools.services.sharing import ( get_share_status, set_public_access, invite_collaborator, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock...
result["message"]
assert
complex_expr
tests/services/test_sharing.py
test_valid_viewer_role
TestInviteCollaborator
135
null
jacob-bd/notebooklm-mcp-cli
import pytest import httpx from unittest.mock import Mock, patch from notebooklm_tools.core.retry import ( is_retryable_error, execute_with_retry, retry_on_server_error, DEFAULT_MAX_RETRIES, DEFAULT_BASE_DELAY ) def mock_sleep(): with patch("time.sleep") as mock: yield mock def test_ex...
httpx.HTTPStatusError)
pytest.raises
complex_expr
tests/core/test_retry.py
test_execute_with_retry_max_retries_exceeded
65
null
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core import constants class TestInfographicVerbDefaults: def test_orientation_default_is_valid(self): assert "landscape" in
constants.INFOGRAPHIC_ORIENTATIONS.names
assert
complex_expr
tests/cli/test_verbs_defaults.py
test_orientation_default_is_valid
TestInfographicVerbDefaults
55
null
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core.base import BaseClient from notebooklm_tools.core.download import DownloadMixin class TestDownloadMixinMethods: def test_extract_cell_text_handles_nested_list(self): """Test that _extract_cell_text handles nested list input.""" result = DownloadMixin._extr...
result
assert
variable
tests/core/test_download.py
test_extract_cell_text_handles_nested_list
TestDownloadMixinMethods
86
null
jacob-bd/notebooklm-mcp-cli
import json import pytest from unittest.mock import MagicMock, patch from notebooklm_tools.services.studio import ( validate_artifact_type, resolve_code, create_artifact, get_studio_status, rename_artifact, delete_artifact, VALID_ARTIFACT_TYPES, ) from notebooklm_tools.services.errors impo...
"art-1"
assert
string_literal
tests/services/test_studio.py
test_create_audio
TestCreateArtifact
94
null
jacob-bd/notebooklm-mcp-cli
import tempfile from pathlib import Path from unittest.mock import patch, MagicMock import pytest class TestMCPSourceAddFile: def test_source_add_file_calls_client(self): """Test that source_add file type calls client.add_file correctly.""" from notebooklm_tools.mcp.tools import sources f...
"file"
assert
string_literal
tests/test_mcp_file_upload.py
test_source_add_file_calls_client
TestMCPSourceAddFile
54
null
jacob-bd/notebooklm-mcp-cli
from notebooklm_tools.core.exceptions import AccountMismatchError, NLMError def test_account_mismatch_error_has_hint(): """Error should include a hint about --force.""" err = AccountMismatchError( stored_email="work@company.com", new_email="personal@gmail.com", profile_name="work", ...
err.hint
assert
complex_expr
tests/core/test_auth_guard.py
test_account_mismatch_error_has_hint
30
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.chat import query, configure_chat from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestConfigureChat: def test_custom_goal_with_prompt_works(self, mock_clien...
"custom"
assert
string_literal
tests/services/test_chat.py
test_custom_goal_with_prompt_works
TestConfigureChat
103
null
vndee/llm-sandbox
import logging from typing import TYPE_CHECKING import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.exceptions import LanguageNotSupportedError from llm_sandbox.language_handlers.base import AbstractLanguageHandler, PlotOutput from llm_sandbox.language_handlers.cpp_handler import CppHandler...
"cpp"
assert
string_literal
tests/test_language_handler_factory.py
test_create_cpp_handler
TestLanguageHandlerFactory
56
null
vndee/llm-sandbox
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.cpp_handler import CppHandler class TestCppHandler: def test_init(self) -> None: """Test CppHandler initialization.""" handler = CppHandler() as...
"cpp"
assert
string_literal
tests/test_cpp_handler.py
test_init
TestCppHandler
19
null
vndee/llm-sandbox
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.ruby_handler import RubyHandler class TestRubyHandler: def test_init(self) -> None: """Test RubyHandler initialization.""" handler = RubyHandler() ...
"rb"
assert
string_literal
tests/test_ruby_handler.py
test_init
TestRubyHandler
19
null
vndee/llm-sandbox
from collections.abc import Generator from typing import Any from unittest.mock import MagicMock, patch import pytest from llm_sandbox.docker import SandboxDockerSession from llm_sandbox.session import SandboxSession def mock_docker_client() -> MagicMock: """Create a mock Docker client.""" return MagicMock()...
"strict"
assert
string_literal
tests/test_encoding_errors.py
test_sandbox_session_default_raises_on_invalid_utf8
TestDefaultEncodingBehavior
32
null
vndee/llm-sandbox
import base64 from typing import Any from unittest.mock import MagicMock, patch import pytest from llm_sandbox import ArtifactSandboxSession, SandboxBackend from llm_sandbox.data import ConsoleOutput, FileType, PlotOutput def create_mock_plot_data(count: int = 1) -> bytes | list[PlotOutput]: """Create mock plot ...
"hello"
assert
string_literal
tests/test_plot_clearing.py
test_clear_plots_with_no_plotting
TestPlotClearing
191
null