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
rtCamp/Frappe-Manager
from pathlib import Path from frappe_manager.ssl_manager.no_op_certificate_service import NoOpCertificateService class TestNoOpCertificateServiceRenewCertificate: def test_renew_certificate_returns_true(self, tmp_path, mock_output_handler, mock_certificate, mocker): """Test that renew_certificate returns...
True
assert
bool_literal
tests/unit/ssl_manager/test_no_op_certificate_service.py
test_renew_certificate_returns_true
TestNoOpCertificateServiceRenewCertificate
100
null
rtCamp/Frappe-Manager
from frappe_manager.logger.context import LoggerContext class TestLoggerContextDictConversion: def test_empty_context_to_dict(self): """Test converting empty context to dictionary.""" ctx = LoggerContext() d = ctx.to_dict() assert d["bench"] is None assert d["operation"] i...
4
assert
numeric_literal
tests/unit/logger/test_context.py
test_empty_context_to_dict
TestLoggerContextDictConversion
244
null
rtCamp/Frappe-Manager
from unittest.mock import patch import pytest from frappe_manager.docker.docker_compose import DockerComposeWrapper, docker_command class TestDockerCommandDecorator: def test_decorator_with_none_positional_param(self): """Test that None positional parameters are not added""" class MockWrapper: ...
"ps"
assert
string_literal
tests/unit/docker/test_decorator.py
test_decorator_with_none_positional_param
TestDockerCommandDecorator
217
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.output_manager.silent_output import SilentOutputHandler class TestSilentOutputHandlerAdvancedOperations: def test_prompt_ask_returns_default(self): """prompt_ask() returns default value when provided.""" handler = SilentOutputHandler() result = handler.p...
"test"
assert
string_literal
tests/unit/output_manager/test_silent_output.py
test_prompt_ask_returns_default
TestSilentOutputHandlerAdvancedOperations
136
null
rtCamp/Frappe-Manager
from unittest.mock import Mock, patch from frappe_manager.docker import DockerClient, DockerComposeWrapper class TestDockerComposeWrapperContextManager: def test_with_auto_cleanup_none_services(self, tmp_path): """Test that with_auto_cleanup accepts None as services""" compose_file = tmp_path / "...
[]
assert
collection
tests/unit/docker/test_context_manager.py
test_with_auto_cleanup_none_services
TestDockerComposeWrapperContextManager
105
null
rtCamp/Frappe-Manager
from pathlib import Path import pytest from frappe_manager.ssl_manager.storage_config import SSLStorageConfig class TestSSLStorageConfigInitialization: def test_validate_on_init_false_no_validation(self, tmp_path): """Test that validate_on_init=False skips validation.""" # Create config with non...
tmp_path / "nonexistent_ssl"
assert
complex_expr
tests/unit/ssl_manager/test_storage_config.py
test_validate_on_init_false_no_validation
TestSSLStorageConfigInitialization
57
null
rtCamp/Frappe-Manager
import logging import tempfile from pathlib import Path from unittest.mock import MagicMock import pytest from frappe_manager.logger.context import LoggerContext from frappe_manager.logger.contextual import ContextualLogger def mock_logger(): """Create a mock logger for testing.""" logger = MagicMock(spec=lo...
context
assert
variable
tests/unit/logger/test_contextual.py
test_create_with_context
TestContextualLoggerCreation
61
null
rtCamp/Frappe-Manager
import logging from unittest.mock import MagicMock from frappe_manager.logger.live_aware_handler import LiveAwareRichHandler class TestLoggerIntegration: def test_handler_removes_old_handlers(self): """Verify old handlers are removed when adding new one.""" from rich.logging import RichHandler ...
1
assert
numeric_literal
tests/unit/logger/test_live_aware_handler.py
test_handler_removes_old_handlers
TestLoggerIntegration
114
null
rtCamp/Frappe-Manager
from pathlib import Path import pytest from frappe_manager.ssl_manager.certificate_link_manager import CertificateLinkManager from frappe_manager.ssl_manager.storage_config import SSLStorageConfig class TestCertificateLinkManagerLinkCertificate: def test_link_certificate_creates_symlinks_for_primary_domain(self...
storage_config.certs_dir / "example.com.key"
assert
complex_expr
tests/unit/ssl_manager/test_certificate_link_manager.py
test_link_certificate_creates_symlinks_for_primary_domain
TestCertificateLinkManagerLinkCertificate
132
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.exceptions import ValidationError from frappe_manager.output_manager.json_output import JSONOutputHandler from frappe_manager.output_manager.rich_output import RichOutputHandler from frappe_manager.output_manager.silent_output import SilentOutputHandler class TestErrorHandlingUseCase...
RuntimeError, match="All services failed")
pytest.raises
complex_expr
tests/unit/output_manager/test_error_handling_patterns.py
test_multiple_display_errors_before_fatal
TestErrorHandlingUseCases
130
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.output_manager.base import OutputHandler from frappe_manager.output_manager.globals import ( get_global_output_handler, has_global_output_handler, set_global_output_handler, ) from frappe_manager.output_manager.rich_output import RichOutputHandler from frappe_manager.outpu...
first_handler
assert
variable
tests/unit/output_manager/test_global_handler.py
test_replace_existing_handler
TestGlobalHandlerInitialization
56
null
rtCamp/Frappe-Manager
from unittest.mock import MagicMock, mock_open, patch import pytest from frappe_manager.docker import ComposeFile def temp_compose_yml(tmp_path): """Create a temporary compose file path.""" return tmp_path / "docker-compose.yml" def sample_yml_content(): """Sample docker-compose YAML structure.""" r...
0
assert
numeric_literal
tests/unit/docker/test_compose_file.py
test_commit_applies_pending_changes
TestTransactionSupport
211
null
rtCamp/Frappe-Manager
from unittest.mock import MagicMock, patch from frappe_manager.migration_manager.migration_helpers import ( MigrationBench, MigrationBenches, MigrationServicesManager, ) class TestMigrationBenches: def test_get_all_benches_finds_benches_with_compose_files(self, tmp_path): benches_path = tmp_pa...
result
assert
variable
tests/unit/migration_manager/test_migration_helpers.py
test_get_all_benches_finds_benches_with_compose_files
TestMigrationBenches
102
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.output_manager.base import OutputHandler from frappe_manager.output_manager.globals import ( get_global_output_handler, has_global_output_handler, set_global_output_handler, ) from frappe_manager.output_manager.rich_output import RichOutputHandler from frappe_manager.outpu...
basic_handler
assert
variable
tests/unit/output_manager/test_global_handler.py
test_simulates_cli_lifecycle
TestGlobalHandlerRealUsage
152
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.output_manager import ( nested_spinner, spinner, spinner_or_pass, temporary_stop, ) from frappe_manager.output_manager.json_output import JSONOutputHandler def test_nested_spinner(): output = JSONOutputHandler() with spinner(output, "Outer"): output.p...
3
assert
numeric_literal
tests/unit/output_manager/test_context_managers.py
test_nested_spinner
117
null
rtCamp/Frappe-Manager
from pathlib import Path from frappe_manager.docker import DockerVolumeMount, DockerVolumeType from frappe_manager.ssl_manager.proxy_storage import ProxyStoragePaths class TestProxyStoragePathsInitialization: def test_init_stores_service_name_and_compose_project(self, mocker, mock_compose_file_manager): ...
"nginx-proxy"
assert
string_literal
tests/unit/ssl_manager/test_proxy_storage.py
test_init_stores_service_name_and_compose_project
TestProxyStoragePathsInitialization
24
null
rtCamp/Frappe-Manager
from datetime import datetime, timedelta from unittest.mock import patch import pytest from frappe_manager.ssl_manager.certificate_exceptions import ( SSLCertificateChallengeFailed, SSLCertificateGenerateFailed, SSLCertificateNotDueForRenewalError, SSLCertificateNotFoundError, SSLDNSChallengeCrede...
exception.message
assert
complex_expr
tests/unit/ssl_manager/test_certificate_exceptions.py
test_exception_message_includes_domain
TestSSLCertificateNotFoundError
30
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.output_manager import ( nested_spinner, spinner, spinner_or_pass, temporary_stop, ) from frappe_manager.output_manager.json_output import JSONOutputHandler def test_spinner_context_manager_basic(): output = JSONOutputHandler() with spinner(output, "Working"):...
"stop"
assert
string_literal
tests/unit/output_manager/test_context_managers.py
test_spinner_context_manager_basic
22
null
rtCamp/Frappe-Manager
from unittest.mock import MagicMock, patch from frappe_manager.migration_manager.migration_helpers import ( MigrationBench, MigrationBenches, MigrationServicesManager, ) class TestMigrationBenches: def test_get_all_benches_finds_benches_with_compose_files(self, tmp_path): benches_path = tmp_pa...
2
assert
numeric_literal
tests/unit/migration_manager/test_migration_helpers.py
test_get_all_benches_finds_benches_with_compose_files
TestMigrationBenches
101
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.output_manager.base import OutputHandler from frappe_manager.output_manager.globals import ( get_global_output_handler, has_global_output_handler, set_global_output_handler, ) from frappe_manager.output_manager.rich_output import RichOutputHandler from frappe_manager.outpu...
handler
assert
variable
tests/unit/output_manager/test_global_handler.py
test_set_and_get_handler
TestGlobalHandlerInitialization
49
null
rtCamp/Frappe-Manager
import pytest from pydantic import ValidationError from frappe_manager.ssl_manager import SUPPORTED_SSL_TYPES from frappe_manager.ssl_manager.certificate import SSLCertificate from tests.unit.ssl_manager.conftest import TEST_DOMAINS class TestSSLCertificateSerialization: def test_model_dump_includes_all_non_excl...
data
assert
variable
tests/unit/ssl_manager/test_certificate.py
test_model_dump_includes_all_non_excluded_fields
TestSSLCertificateSerialization
86
null
rtCamp/Frappe-Manager
from unittest.mock import Mock from frappe_manager.ssl_manager import LETSENCRYPT_PREFERRED_CHALLENGE, SUPPORTED_SSL_TYPES from frappe_manager.ssl_manager.acmesh_certificate_service import AcmeShCertificateService from frappe_manager.ssl_manager.certificate import SSLCertificate from frappe_manager.ssl_manager.no_op_c...
ssl_dir / "acmesh"
assert
complex_expr
tests/unit/ssl_manager/test_service_factory.py
test_acmesh_service_receives_correct_paths
TestCreateCertificateService
96
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.output_manager import ( nested_spinner, spinner, spinner_or_pass, temporary_stop, ) from frappe_manager.output_manager.json_output import JSONOutputHandler def test_spinner_context_manager_basic(): output = JSONOutputHandler() with spinner(output, "Working"):...
"start"
assert
string_literal
tests/unit/output_manager/test_context_managers.py
test_spinner_context_manager_basic
20
null
rtCamp/Frappe-Manager
from unittest.mock import Mock, patch import pytest from frappe_manager.metadata_manager import FMConfigManager from frappe_manager.migration_manager.migration_executor import MigrationExecutor from frappe_manager.migration_manager.version import Version class TestMigrationFlowIntegration: def test_fresh_install...
Version("0.19.0")
assert
func_call
tests/integration/test_migration_flow.py
test_fresh_install_skips_migration
TestMigrationFlowIntegration
24
null
rtCamp/Frappe-Manager
from unittest.mock import MagicMock, patch from frappe_manager.migration_manager.migration_helpers import ( MigrationBench, MigrationBenches, MigrationServicesManager, ) class TestMigrationBenches: def test_get_all_benches_excludes_specified_benches(self, tmp_path): benches_path = tmp_path / ...
1
assert
numeric_literal
tests/unit/migration_manager/test_migration_helpers.py
test_get_all_benches_excludes_specified_benches
TestMigrationBenches
121
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.exceptions import ValidationError from frappe_manager.output_manager.json_output import JSONOutputHandler from frappe_manager.output_manager.rich_output import RichOutputHandler from frappe_manager.output_manager.silent_output import SilentOutputHandler class TestErrorPattern: d...
"RuntimeError"
assert
string_literal
tests/unit/output_manager/test_error_handling_patterns.py
test_error_always_raises_with_json_handler
TestErrorPattern
92
null
rtCamp/Frappe-Manager
import logging import pytest from frappe_manager.logger import log from frappe_manager.logger.context import LoggerContext from frappe_manager.logger.contextual import ContextualLogger from frappe_manager.output_manager.logging_output import LoggingOutputHandler from frappe_manager.output_manager.silent_output import...
3
assert
numeric_literal
tests/integration/test_contextual_logging.py
test_context_flows_from_logger_to_file
TestContextualLoggingEndToEnd
66
null
rtCamp/Frappe-Manager
import json import pytest from frappe_manager.output_manager.json_output import JSONOutputHandler, OutputEvent class TestJSONOutputHandlerBasics: def test_stop_captures_event(self): """stop() captures a stop event.""" handler = JSONOutputHandler() handler.start("Test") handler.s...
2
assert
numeric_literal
tests/unit/output_manager/test_json_output.py
test_stop_captures_event
TestJSONOutputHandlerBasics
74
null
rtCamp/Frappe-Manager
from unittest.mock import Mock, patch import pytest from frappe_manager.migration_manager.migration_executor import MigrationExecutor, needs_migration from frappe_manager.migration_manager.version import Version class TestMigrationExecutorWithOptions: def test_executor_accepts_skip_backup_option(self, mock_fm_co...
[]
assert
collection
tests/unit/migration_manager/test_migration_executor_options.py
test_executor_accepts_skip_backup_option
TestMigrationExecutorWithOptions
43
null
rtCamp/Frappe-Manager
from pathlib import Path from frappe_manager.docker import DockerVolumeMount, DockerVolumeType from frappe_manager.ssl_manager.proxy_storage import ProxyStoragePaths class TestProxyStoragePathsVolumeAccess: def test_volume_mount_container_path_accessible(self, mocker, mock_compose_file_manager): """Test ...
Path("/etc/nginx/certs")
assert
func_call
tests/unit/ssl_manager/test_proxy_storage.py
test_volume_mount_container_path_accessible
TestProxyStoragePathsVolumeAccess
198
null
rtCamp/Frappe-Manager
import pytest from pydantic import ValidationError from frappe_manager.ssl_manager import SUPPORTED_SSL_TYPES from frappe_manager.ssl_manager.certificate import SSLCertificate from tests.unit.ssl_manager.conftest import TEST_DOMAINS class TestSSLCertificateValidation: def test_invalid_ssl_type_raises_validation_...
error_msg
assert
variable
tests/unit/ssl_manager/test_certificate.py
test_invalid_ssl_type_raises_validation_error
TestSSLCertificateValidation
67
null
rtCamp/Frappe-Manager
from unittest.mock import MagicMock, mock_open, patch import pytest from frappe_manager.docker import ComposeFile def temp_compose_yml(tmp_path): """Create a temporary compose file path.""" return tmp_path / "docker-compose.yml" def sample_yml_content(): """Sample docker-compose YAML structure.""" r...
{}
assert
collection
tests/unit/docker/test_compose_file.py
test_with_envs_queues_change
TestBuilderPatternBasics
78
null
rtCamp/Frappe-Manager
from unittest.mock import Mock, patch from frappe_manager.docker import DockerClient, DockerComposeWrapper class TestDockerClientContextManager: def test_enter_returns_self_without_compose(self): """Test that __enter__ returns self when no compose file provided""" client = DockerClient() ...
client
assert
variable
tests/unit/docker/test_context_manager.py
test_enter_returns_self_without_compose
TestDockerClientContextManager
187
null
rtCamp/Frappe-Manager
import logging import tempfile from pathlib import Path from unittest.mock import MagicMock import pytest from frappe_manager.logger.context import LoggerContext from frappe_manager.logger.contextual import ContextualLogger def mock_logger(): """Create a mock logger for testing.""" logger = MagicMock(spec=lo...
line
assert
variable
tests/unit/logger/test_contextual.py
test_multiple_messages_all_have_context
TestContextualLoggerFileLogging
422
null
rtCamp/Frappe-Manager
from frappe_manager.site_manager.domain_conflict import ( check_domain_conflicts, validate_domains_unique, ) def test_case_insensitive_matching(tmp_path): domain_map = {} domain_map["site1.com"] = ("bench1", True) assert "site1.com" in
domain_map
assert
variable
tests/unit/site_manager/test_domain_conflict.py
test_case_insensitive_matching
34
null
rtCamp/Frappe-Manager
from unittest.mock import MagicMock, mock_open, patch import pytest from frappe_manager.docker import ComposeFile def temp_compose_yml(tmp_path): """Create a temporary compose file path.""" return tmp_path / "docker-compose.yml" def sample_yml_content(): """Sample docker-compose YAML structure.""" r...
1
assert
numeric_literal
tests/unit/docker/test_compose_file.py
test_with_envs_queues_change
TestBuilderPatternBasics
74
null
rtCamp/Frappe-Manager
from frappe_manager.ssl_manager.nginx_controller import NginxController class TestNginxControllerRestart: def test_restart_uses_correct_service_name(self, mocker, mock_compose_file_manager, mock_docker_client): """Test that restart uses the correct service name from initialization.""" mock_output ...
"my-nginx")
assert_*
string_literal
tests/unit/ssl_manager/test_nginx_controller.py
test_restart_uses_correct_service_name
TestNginxControllerRestart
164
null
rtCamp/Frappe-Manager
import logging import pytest from frappe_manager.logger import log from frappe_manager.logger.context import LoggerContext from frappe_manager.logger.contextual import ContextualLogger from frappe_manager.output_manager.logging_output import LoggingOutputHandler from frappe_manager.output_manager.silent_output import...
2
assert
numeric_literal
tests/integration/test_contextual_logging.py
test_multiple_benches_distinguished_by_context
TestContextualLoggingEndToEnd
154
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.output_manager.silent_output import SilentOutputHandler class TestSilentOutputHandlerBasics: def test_initialization(self): """SilentOutputHandler can be instantiated.""" handler = SilentOutputHandler() assert handler is not
None
assert
none_literal
tests/unit/output_manager/test_silent_output.py
test_initialization
TestSilentOutputHandlerBasics
19
null
rtCamp/Frappe-Manager
from unittest.mock import MagicMock, patch import pytest from frappe_manager.output_manager.rich_output import RichOutputHandler class Test_InteractiveFlag: def test_flag_true_forces_interactive(self): """_interactive=True forces interactive mode.""" handler = RichOutputHandler() handler...
True
assert
bool_literal
tests/unit/output_manager/test_rich_output.py
test_flag_true_forces_interactive
Test_InteractiveFlag
275
null
rtCamp/Frappe-Manager
from unittest.mock import MagicMock, patch import pytest from frappe_manager.output_manager.rich_output import RichOutputHandler class TestRichOutputHandlerInitialization: def test_interactive_mode_defaults_to_tty(self): """Interactive mode defaults based on TTY availability.""" handler = RichOu...
handler._tty_available
assert
complex_expr
tests/unit/output_manager/test_rich_output.py
test_interactive_mode_defaults_to_tty
TestRichOutputHandlerInitialization
32
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.output_manager import ( nested_spinner, spinner, spinner_or_pass, temporary_stop, ) from frappe_manager.output_manager.json_output import JSONOutputHandler def test_spinner_or_pass_disabled(): output = JSONOutputHandler() with spinner_or_pass(output, "Working...
1
assert
numeric_literal
tests/unit/output_manager/test_context_managers.py
test_spinner_or_pass_disabled
68
null
rtCamp/Frappe-Manager
from unittest.mock import Mock from frappe_manager.ssl_manager import LETSENCRYPT_PREFERRED_CHALLENGE, SUPPORTED_SSL_TYPES from frappe_manager.ssl_manager.acmesh_certificate_service import AcmeShCertificateService from frappe_manager.ssl_manager.certificate import SSLCertificate from frappe_manager.ssl_manager.no_op_c...
webroot_dir
assert
variable
tests/unit/ssl_manager/test_service_factory.py
test_acmesh_service_receives_correct_paths
TestCreateCertificateService
97
null
rtCamp/Frappe-Manager
import logging from unittest.mock import MagicMock from frappe_manager.logger.live_aware_handler import LiveAwareRichHandler class TestLiveAwareRichHandler: def test_handler_accepts_output_lock_parameter(self): """Verify handler accepts output_lock parameter for future use.""" mock_lock = MagicMo...
mock_lock
assert
variable
tests/unit/logger/test_live_aware_handler.py
test_handler_accepts_output_lock_parameter
TestLiveAwareRichHandler
40
null
rtCamp/Frappe-Manager
import logging from unittest.mock import MagicMock from frappe_manager.logger.live_aware_handler import LiveAwareRichHandler class TestLoggerIntegration: def test_add_console_handler_creates_live_aware_handler(self): """Verify that _add_console_handler creates LiveAwareRichHandler.""" from frappe...
underlying_output.live
assert
complex_expr
tests/unit/logger/test_live_aware_handler.py
test_add_console_handler_creates_live_aware_handler
TestLoggerIntegration
99
null
rtCamp/Frappe-Manager
from unittest.mock import Mock, patch import pytest from frappe_manager.metadata_manager import FMConfigManager from frappe_manager.migration_manager.migration_executor import MigrationExecutor from frappe_manager.migration_manager.version import Version class TestMigrationFlowIntegration: def test_fresh_install...
True
assert
bool_literal
tests/integration/test_migration_flow.py
test_fresh_install_skips_migration
TestMigrationFlowIntegration
22
null
rtCamp/Frappe-Manager
import logging import pytest from frappe_manager.logger import log from frappe_manager.logger.context import LoggerContext from frappe_manager.logger.contextual import ContextualLogger from frappe_manager.output_manager.logging_output import LoggingOutputHandler from frappe_manager.output_manager.silent_output import...
1
assert
numeric_literal
tests/integration/test_contextual_logging.py
test_can_grep_by_bench_name
TestContextualLoggingGreppability
382
null
rtCamp/Frappe-Manager
from datetime import datetime, timedelta from unittest.mock import patch import pytest from frappe_manager.ssl_manager.certificate_exceptions import ( SSLCertificateChallengeFailed, SSLCertificateGenerateFailed, SSLCertificateNotDueForRenewalError, SSLCertificateNotFoundError, SSLDNSChallengeCrede...
str(exception)
assert
func_call
tests/unit/ssl_manager/test_certificate_exceptions.py
test_exception_message_includes_domain
TestSSLCertificateNotFoundError
31
null
rtCamp/Frappe-Manager
from unittest.mock import MagicMock import pytest from frappe_manager.exceptions import NonInteractiveError from frappe_manager.output_manager import ( JSONOutputHandler, RichOutputHandler, SilentOutputHandler, ) from frappe_manager.output_manager.logging_output import LoggingOutputHandler class TestRich...
"bench1"
assert
string_literal
tests/unit/output_manager/test_prompt_fuzzy.py
test_prompt_fuzzy_non_interactive_with_default_returns_default
TestRichOutputHandlerPromptFuzzy
37
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.output_manager import ( nested_spinner, spinner, spinner_or_pass, temporary_stop, ) from frappe_manager.output_manager.json_output import JSONOutputHandler def test_spinner_context_manager_basic(): output = JSONOutputHandler() with spinner(output, "Working"):...
"Working"
assert
string_literal
tests/unit/output_manager/test_context_managers.py
test_spinner_context_manager_basic
21
null
rtCamp/Frappe-Manager
from unittest.mock import MagicMock, patch import pytest from frappe_manager.output_manager.rich_output import RichOutputHandler class TestRichOutputHandlerInitialization: def test_initialization(self): """RichOutputHandler initializes with Rich components.""" handler = RichOutputHandler() ...
None
assert
none_literal
tests/unit/output_manager/test_rich_output.py
test_initialization
TestRichOutputHandlerInitialization
21
null
rtCamp/Frappe-Manager
from pathlib import Path import pytest from frappe_manager.ssl_manager.storage_config import SSLStorageConfig class TestSSLStorageConfigValidationFailures: def test_validate_on_init_missing_ssl_dir_raises_error(self, tmp_path): """Test that validate_on_init=True raises error if ssl_dir missing.""" ...
str(exc_info.value)
assert
func_call
tests/unit/ssl_manager/test_storage_config.py
test_validate_on_init_missing_ssl_dir_raises_error
TestSSLStorageConfigValidationFailures
174
null
rtCamp/Frappe-Manager
import subprocess from pathlib import Path from unittest.mock import Mock, patch import pytest from frappe_manager.ssl_manager.acmesh_certificate_service import ( LETSENCRYPT_PRODUCTION_SERVER, LETSENCRYPT_STAGING_SERVER, AcmeShCertificateService, ) from frappe_manager.ssl_manager.certificate_exceptions i...
command
assert
variable
tests/unit/ssl_manager/test_acmesh_certificate_service.py
test_remove_certificate_success
TestAcmeShCertificateServiceRemoveCertificate
536
null
rtCamp/Frappe-Manager
import json from unittest.mock import patch from rich.table import Table from frappe_manager.output_manager.rich_output import RichOutputHandler class TestRichOutputHandlerStreamSeparation: def test_live_lines_routes_mixed_streams_correctly_non_tty(self): output = RichOutputHandler() output._int...
1
assert
numeric_literal
tests/unit/output_manager/test_stream_separation.py
test_live_lines_routes_mixed_streams_correctly_non_tty
TestRichOutputHandlerStreamSeparation
143
null
rtCamp/Frappe-Manager
from unittest.mock import MagicMock, patch import pytest import typer from frappe_manager.commands import app_callback class TestLogLevelFlagParsing: def test_single_v_flag_sets_info_level(self): """Test that -v sets INFO level.""" ctx = MagicMock(spec=typer.Context) ctx.obj = {} ...
"INFO"
assert
string_literal
tests/unit/cli/test_log_level_flags.py
test_single_v_flag_sets_info_level
TestLogLevelFlagParsing
40
null
rtCamp/Frappe-Manager
import pytest from frappe_manager.output_manager.base import OutputHandler from frappe_manager.output_manager.globals import ( get_global_output_handler, has_global_output_handler, set_global_output_handler, ) from frappe_manager.output_manager.rich_output import RichOutputHandler from frappe_manager.outpu...
second_get
assert
variable
tests/unit/output_manager/test_global_handler.py
test_same_instance_returned
TestGlobalHandlerSingleton
71
null
XKNX/xknx
import pytest from xknx.exceptions import CouldNotParseKNXIP from xknx.knxip import DisconnectRequest, KNXIPHeader, KNXIPServiceType class TestKNXIPHeader: def test_from_knx(self) -> None: """Test parsing and streaming wrong Header (wrong length byte).""" raw = bytes((0x06, 0x10, 0x04, 0x21, 0x00...
raw
assert
variable
test/knxip_tests/header_test.py
test_from_knx
TestKNXIPHeader
21
null
XKNX/xknx
import pytest from xknx.exceptions import CouldNotParseKNXIP from xknx.knxip import DeviceConfigurationAck, ErrorCode, KNXIPFrame class TestKNXIPDeviceConfigurationAck: def test_device_configuration_ack(self) -> None: """Test parsing and streaming device configuration ACK KNX/IP packet.""" raw = ...
raw
assert
variable
test/knxip_tests/device_configuration_ack_test.py
test_device_configuration_ack
TestKNXIPDeviceConfigurationAck
28
null
XKNX/xknx
import pytest from xknx.exceptions import CouldNotParseKNXIP from xknx.knxip import ConnectionStateResponse, ErrorCode, KNXIPFrame class TestKNXIPConnectionStateResponse: def test_disconnect_response(self) -> None: """Test parsing and streaming connection state response KNX/IP packet.""" raw = by...
raw
assert
variable
test/knxip_tests/connectionstate_response_test.py
test_disconnect_response
TestKNXIPConnectionStateResponse
28
null
XKNX/xknx
import pytest from xknx.dpt import * # pylint: disable=wildcard-import,unused-wildcard-import @pytest.mark.parametrize( ("value_type", "dpt_class", "main", "sub", "unit"), [ ("1byte_signed", DPTSignedRelativeValue, 6, None, None), ("1byte_unsigned", DPTValue1ByteUnsigned, 5, None, None), ...
unit
assert
variable
test/dpt_tests/dpt_lookup_test.py
test_dpt_lookup
253
null
XKNX/xknx
import datetime from typing import Any import pytest from xknx.dpt import DPTArray, DPTDate from xknx.dpt.dpt_11 import KNXDate from xknx.exceptions import ConversionError, CouldNotParseTelegram class TestKNXDate: @pytest.mark.parametrize( ("data", "value"), [ ({"year": 1990, "month"...
data
assert
variable
test/dpt_tests/dpt_11_date_test.py
test_dict
TestKNXDate
27
null
XKNX/xknx
import pytest from xknx.cemi import ( CEMIFlags, CEMIFrame, CEMILData, CEMIMessageCode, CEMIMPropReadRequest, CEMIMPropReadResponse, CEMIMPropWriteRequest, CEMIMPropWriteResponse, ) from xknx.cemi.const import CEMIErrorCode from xknx.exceptions import ConversionError, CouldNotParseCEMI,...
7
assert
numeric_literal
test/cemi_tests/cemi_frame_test.py
test_valid_read_req
290
null
XKNX/xknx
from unittest.mock import Mock from xknx import XKNX from xknx.devices import Scene from xknx.dpt import DPTArray from xknx.telegram import GroupAddress, Telegram from xknx.telegram.apci import GroupValueWrite class TestScene: async def test_sync(self) -> None: """Test sync function / sending group reads...
0
assert
numeric_literal
test/devices_tests/scene_test.py
test_sync
TestScene
23
null
XKNX/xknx
import pytest from xknx.exceptions import CouldNotParseKNXIP from xknx.knxip import ( HPAI, ConnectRequestType, ConnectResponse, ConnectResponseData, ErrorCode, KNXIPFrame, ) from xknx.telegram import IndividualAddress class TestKNXIPConnectResponse: def test_tunnel_connect_response(self)...
raw
assert
variable
test/knxip_tests/connect_response_test.py
test_tunnel_connect_response
TestKNXIPConnectResponse
44
null
XKNX/xknx
from xknx.knxip import HPAI, KNXIPFrame, SearchRequestExtended from xknx.knxip.srp import SRP class TestKNXIPSearchRequestExtended: def test_search_request_extended(self) -> None: """Test parsing and streaming SearchRequest Extended KNX/IP packet.""" raw = bytes.fromhex("06 10 02 0b 00 0e 08 01 e0...
raw
assert
variable
test/knxip_tests/search_request_extended_test.py
test_search_request_extended
TestKNXIPSearchRequestExtended
26
null
XKNX/xknx
from typing import Any from unittest.mock import Mock, patch import pytest from xknx import XKNX from xknx.core import XknxConnectionState from xknx.core.state_updater import StateTrackerType, _StateTracker from xknx.remote_value import RemoteValue from xknx.telegram import GroupAddress class TestStateUpdater: ...
60 * 60
assert
complex_expr
test/core_tests/state_updater_test.py
test_tracker_parser
TestStateUpdater
88
null
XKNX/xknx
import pytest from xknx.exceptions import CouldNotParseKNXIP from xknx.knxip import KNXIPFrame, RoutingLostMessage class TestKNXIPRoutingLostMessage: def test_routing_lost_message(self) -> None: """Test parsing and streaming RoutingLostMessage KNX/IP packet.""" raw = bytes((0x06, 0x10, 0x05, 0x31...
raw
assert
variable
test/knxip_tests/routing_lost_message_test.py
test_routing_lost_message
TestKNXIPRoutingLostMessage
24
null
XKNX/xknx
import pytest from xknx import XKNX from xknx.dpt import DPTArray, DPTBinary from xknx.exceptions import ConversionError from xknx.remote_value import RemoteValueStep from xknx.telegram import GroupAddress, Telegram from xknx.telegram.apci import GroupValueWrite class TestRemoteValueStep: def test_to_knx(self) -...
DPTBinary(0)
assert
func_call
test/remote_value_tests/remote_value_step_test.py
test_to_knx
TestRemoteValueStep
21
null
XKNX/xknx
from typing import Any import pytest from xknx.dpt import DPTArray, DPTTariffActiveEnergy, TariffActiveEnergy from xknx.exceptions import ConversionError, CouldNotParseTelegram class TestDPTTariffActiveEnergy: @pytest.mark.parametrize( ("value", "raw"), [ ( TariffActi...
DPTArray(raw)
assert
func_call
test/dpt_tests/dpt_235_tariff_active_energy_test.py
test_dpt_tariff_active_energy_value
TestDPTTariffActiveEnergy
100
null
XKNX/xknx
from unittest.mock import AsyncMock, Mock, patch import pytest from xknx import XKNX from xknx.devices import BinarySensor, Device, Light, Switch from xknx.telegram import GroupAddress class TestDevices: def test_len(self) -> None: """Test len() function.""" xknx = XKNX() assert len(xkn...
0
assert
numeric_literal
test/devices_tests/devices_test.py
test_len
TestDevices
88
null
XKNX/xknx
import pytest from xknx.exceptions import CouldNotParseKNXIP from xknx.knxip import DisconnectResponse, ErrorCode, KNXIPFrame class TestKNXIPDisconnectResponse: def test_disconnect_response(self) -> None: """Test parsing and streaming DisconnectResponse KNX/IP packet.""" raw = bytes((0x06, 0x10, ...
raw
assert
variable
test/knxip_tests/disconnect_response_test.py
test_disconnect_response
TestKNXIPDisconnectResponse
28
null
XKNX/xknx
import pytest from xknx.cemi import CEMIFrame, CEMILData, CEMIMessageCode from xknx.dpt import DPTBinary from xknx.exceptions import CouldNotParseKNXIP from xknx.knxip import KNXIPFrame, TunnellingRequest from xknx.telegram import GroupAddress, Telegram from xknx.telegram.apci import GroupValueWrite class TestKNXIPTu...
raw
assert
variable
test/knxip_tests/tunnelling_request_test.py
test_connect_request
TestKNXIPTunnellingRequest
50
null
XKNX/xknx
import asyncio from unittest.mock import AsyncMock, Mock import pytest from xknx import XKNX from xknx.core import XknxConnectionState from xknx.core.task_registry import Task from ..conftest import EventLoopClockAdvancer class TestTaskRegistry: @pytest.mark.parametrize("target", ["async", "sync"]) async d...
0
assert
numeric_literal
test/core_tests/task_registry_test.py
test_start_task
TestTaskRegistry
32
null
XKNX/xknx
from unittest.mock import AsyncMock, Mock, call from xknx import XKNX from xknx.core import XknxConnectionState from xknx.devices import ExposeSensor from xknx.dpt import DPTArray, DPTBinary from xknx.telegram import GroupAddress, Telegram, TelegramDirection from xknx.telegram.apci import GroupValueRead, GroupValueRes...
True
assert
bool_literal
test/devices_tests/expose_sensor_test.py
test_str_binary
TestExposeSensor
34
null
XKNX/xknx
from unittest.mock import AsyncMock, Mock, call from xknx import XKNX from xknx.core import XknxConnectionState from xknx.devices import ExposeSensor from xknx.dpt import DPTArray, DPTBinary from xknx.telegram import GroupAddress, Telegram, TelegramDirection from xknx.telegram.apci import GroupValueRead, GroupValueRes...
"°C"
assert
string_literal
test/devices_tests/expose_sensor_test.py
test_str_temperature
TestExposeSensor
69
null
XKNX/xknx
import datetime from typing import Any import pytest from xknx.dpt import DPTArray, DPTBinary, DPTTime from xknx.dpt.dpt_10 import KNXDay, KNXTime from xknx.exceptions import ConversionError, CouldNotParseTelegram class TestKNXTime: @pytest.mark.parametrize( ("time", "value"), [ (dat...
time
assert
variable
test/dpt_tests/dpt_10_time_test.py
test_as_time
TestKNXTime
70
null
XKNX/xknx
from inspect import isabstract from typing import Any import pytest from xknx.dpt import ( DPT2ByteFloat, DPT2ByteUnsigned, DPTActiveEnergy, DPTArray, DPTBase, DPTBinary, DPTColorRGBW, DPTComplex, DPTConsumerProducer, DPTEnum, DPTHVACContrMode, DPTNumeric, DPTScalin...
(1, 1)
assert
collection
test/dpt_tests/dpt_test.py
test_validate_payload_array
TestDPTBaseSubclass
237
null
XKNX/xknx
import datetime import pytest from xknx import XKNX from xknx.devices import Weather from xknx.devices.weather import WeatherCondition from xknx.dpt import DPTArray, DPTBinary from xknx.telegram import GroupAddress, Telegram from xknx.telegram.apci import GroupValueWrite class TestWeather: async def test_humidi...
"%"
assert
string_literal
test/devices_tests/weather_test.py
test_humidity
TestWeather
128
null
XKNX/xknx
import asyncio from datetime import datetime import threading from typing import Any from unittest.mock import Mock, patch from xknx import XKNX from xknx.core import XknxConnectionState, XknxConnectionType from xknx.io import ConnectionConfig from xknx.util import asyncio_timeout class TestConnectionManager: as...
0
assert
numeric_literal
test/core_tests/connection_manager_test.py
test_connection_information
TestConnectionManager
132
null
XKNX/xknx
import logging from pathlib import Path import tempfile from unittest.mock import AsyncMock, Mock, patch import pytest from xknx import XKNX from xknx.exceptions import CommunicationError from xknx.io import ConnectionConfig, ConnectionType class TestXknxModule: def test_register_telegram_cb(self) -> None: ...
1
assert
numeric_literal
test/xknx_test.py
test_register_telegram_cb
TestXknxModule
37
null
XKNX/xknx
import pytest from xknx.exceptions import ( ConversionError, CouldNotParseAddress, CouldNotParseKNXIP, CouldNotParseTelegram, DeviceIllegalValue, XKNXException, ) @pytest.mark.parametrize( "base,equal,diff", [ ( ConversionError("desc1"), ConversionError(...
diff
assert
variable
test/core_tests/exceptions_test.py
test_exceptions
59
null
XKNX/xknx
import datetime import pytest from xknx import XKNX from xknx.devices import Weather from xknx.devices.weather import WeatherCondition from xknx.dpt import DPTArray, DPTBinary from xknx.telegram import GroupAddress, Telegram from xknx.telegram.apci import GroupValueWrite class TestWeather: async def test_temper...
"°C"
assert
string_literal
test/devices_tests/weather_test.py
test_temperature
TestWeather
32
null
XKNX/xknx
import pytest from xknx.dpt import DPTAngle, DPTArray, DPTScaling, DPTTariff, DPTValue1Ucount from xknx.exceptions import ConversionError, CouldNotParseTelegram class TestDPTScaling: @pytest.mark.parametrize( ("raw", "value"), [ ((0x4C,), 30), ((0xFC,), 99), ((...
DPTArray(raw)
assert
func_call
test/dpt_tests/dpt_5_test.py
test_transcoder
TestDPTScaling
72
null
XKNX/xknx
import pytest from xknx.dpt import DPTAngle, DPTArray, DPTScaling, DPTTariff, DPTValue1Ucount from xknx.exceptions import ConversionError, CouldNotParseTelegram class TestDPTValue1Ucount: def test_value_min(self) -> None: """Test parsing and streaming of DPTValue1Ucount 0.""" assert DPTValue1Uco...
DPTArray(0x00)
assert
func_call
test/dpt_tests/dpt_5_test.py
test_value_min
TestDPTValue1Ucount
24
null
XKNX/xknx
from unittest.mock import AsyncMock, Mock, patch import pytest from xknx import XKNX from xknx.devices import BinarySensor, Device, Light, Switch from xknx.telegram import GroupAddress class TestDevices: def test_contains(self) -> None: """Test __contains__() function.""" xknx = XKNX() x...
xknx.devices
assert
complex_expr
test/devices_tests/devices_test.py
test_contains
TestDevices
116
null
XKNX/xknx
from inspect import isabstract from typing import Any import pytest from xknx.dpt import ( DPT2ByteFloat, DPT2ByteUnsigned, DPTActiveEnergy, DPTArray, DPTBase, DPTBinary, DPTColorRGBW, DPTComplex, DPTConsumerProducer, DPTEnum, DPTHVACContrMode, DPTNumeric, DPTScalin...
(1,)
assert
collection
test/dpt_tests/dpt_test.py
test_validate_payload_binary
TestDPTBaseSubclass
255
null
XKNX/xknx
import pytest from xknx.dpt import DPTArray, DPTUElCurrentmA from xknx.exceptions import ConversionError, CouldNotParseTelegram class TestDPT2byte: def test_current_settings(self) -> None: """Test members of DPTUElCurrentmA.""" assert DPTUElCurrentmA.value_min == 0 assert DPTUElCurrentmA....
"mA"
assert
string_literal
test/dpt_tests/dpt_7_test.py
test_current_settings
TestDPT2byte
19
null
XKNX/xknx
from xknx.knxip import KNXIPFrame, TimerNotify class TestKNXIPTimerNotify: def test_timer_notify(self) -> None: """Test parsing and streaming TimerNotify KNX/IP packet.""" message_authentication_code = bytes.fromhex( "72 12 a0 3a aa e4 9d a8 56 89 77 4c 1d 2b 4d a4" ) r...
raw
assert
variable
test/knxip_tests/timer_notify_test.py
test_timer_notify
TestKNXIPTimerNotify
33
null
XKNX/xknx
import pytest from xknx.exceptions import CouldNotParseKNXIP from xknx.knxip import HPAI, ConnectionStateRequest, KNXIPFrame class TestKNXIPConnectionStateRequest: def test_connection_state_request(self) -> None: """Test parsing and streaming connection state request KNX/IP packet.""" raw = bytes...
raw
assert
variable
test/knxip_tests/connectionstate_request_test.py
test_connection_state_request
TestKNXIPConnectionStateRequest
30
null
XKNX/xknx
import pytest from xknx.exceptions import ConversionError from xknx.telegram.tpci import ( TPCI, TAck, TConnect, TDataBroadcast, TDataConnected, TDataGroup, TDataIndividual, TDataTagGroup, TDisconnect, TNak, ) def test_equality() -> None: """Test equality.""" assert TD...
TDataGroup()
assert
func_call
test/telegram_tests/tpci_test.py
test_equality
78
null
XKNX/xknx
import asyncio from unittest.mock import AsyncMock, MagicMock, Mock, call, patch import pytest from xknx import XKNX from xknx.dpt import DPTArray, DPTBinary from xknx.exceptions import CommunicationError, CouldNotParseTelegram from xknx.telegram import AddressFilter, Telegram, TelegramDirection from xknx.telegram.ad...
1
assert
numeric_literal
test/core_tests/telegram_queue_test.py
test_callback_decoded_telegram_data
TestTelegramQueue
233
null
XKNX/xknx
import datetime import pytest from xknx import XKNX from xknx.devices import Weather from xknx.devices.weather import WeatherCondition from xknx.dpt import DPTArray, DPTBinary from xknx.telegram import GroupAddress, Telegram from xknx.telegram.apci import GroupValueWrite class TestWeather: @pytest.mark.parametr...
value
assert
variable
test/devices_tests/weather_test.py
test_pressure
TestWeather
111
null
XKNX/xknx
from unittest.mock import AsyncMock, Mock, call from xknx import XKNX from xknx.core import XknxConnectionState from xknx.devices import ExposeSensor from xknx.dpt import DPTArray, DPTBinary from xknx.telegram import GroupAddress, Telegram, TelegramDirection from xknx.telegram.apci import GroupValueRead, GroupValueRes...
None
assert
none_literal
test/devices_tests/expose_sensor_test.py
test_str_binary
TestExposeSensor
35
null
XKNX/xknx
from xknx.cemi import CEMIFrame, CEMILData, CEMIMessageCode from xknx.dpt import DPTActiveEnergy from xknx.knxip import KNXIPFrame, RoutingIndication from xknx.telegram import GroupAddress, IndividualAddress, Telegram from xknx.telegram.apci import GroupValueWrite class TestKNXIPRountingIndication: def test_from_...
raw
assert
variable
test/knxip_tests/routing_indication_test.py
test_from_knx_to_knx
TestKNXIPRountingIndication
29
null
XKNX/xknx
from typing import Any from unittest.mock import Mock, patch import pytest from xknx import XKNX from xknx.devices import Climate, ClimateMode from xknx.devices.climate import FanSpeedMode, SetpointShiftMode from xknx.dpt import ( DPT2ByteFloat, DPTArray, DPTBinary, DPTHumidity, DPTHVACContrMode, ...
3
assert
numeric_literal
test/devices_tests/climate_test.py
test_set_multiple_mode
TestClimate
482
null
XKNX/xknx
from unittest.mock import Mock, patch from xknx import XKNX from xknx.devices import Light from xknx.devices.light import ColorTemperatureType from xknx.dpt import DPTArray, DPTBinary from xknx.dpt.dpt_242 import XYYColor from xknx.telegram import GroupAddress, Telegram from xknx.telegram.apci import GroupValueRead, G...
8
assert
numeric_literal
test/devices_tests/light_test.py
test_sync_individual_color
TestLight
357
null
XKNX/xknx
from typing import Any from unittest.mock import MagicMock, patch import pytest from xknx import XKNX from xknx.devices import NumericValue from xknx.dpt import DPTArray, DPTBinary, DPTTemperature from xknx.exceptions import ConversionError from xknx.telegram import GroupAddress, Telegram, TelegramDirection, apci fro...
read
assert
variable
test/tools_tests/tools_test.py
test_group_value_read
32
null
XKNX/xknx
import logging from pathlib import Path import tempfile from unittest.mock import AsyncMock, Mock, patch import pytest from xknx import XKNX from xknx.exceptions import CommunicationError from xknx.io import ConnectionConfig, ConnectionType class TestXknxModule: @patch("xknx.io.KNXIPInterface._start", new_calla...
None
assert
none_literal
test/xknx_test.py
test_xknx_start_and_stop_with_dedicated_connection_config
TestXknxModule
81
null
XKNX/xknx
import math import struct from unittest.mock import patch import pytest from xknx.dpt import ( DPT4ByteFloat, DPTArray, DPTElectricCurrent, DPTElectricPotential, DPTFrequency, DPTPhaseAngleDeg, DPTPower, ) from xknx.exceptions import ConversionError, CouldNotParseTelegram class TestDPT4By...
"A"
assert
string_literal
test/dpt_tests/dpt_14_float_test.py
test_electric_current_settings
TestDPT4ByteFloat
97
null
XKNX/xknx
from typing import Any from unittest.mock import Mock, patch import pytest from xknx import XKNX from xknx.core import XknxConnectionState from xknx.core.state_updater import StateTrackerType, _StateTracker from xknx.remote_value import RemoteValue from xknx.telegram import GroupAddress class TestStateUpdater: ...
10 * 60
assert
complex_expr
test/core_tests/state_updater_test.py
test_tracker_parser
TestStateUpdater
112
null