Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Screenly/Anthias
/ functions
Functions
1,832 in github.com/Screenly/Anthias
⨍
Functions
1,832
◇
Types & classes
160
↳
Endpoints
84
Function
test_set_display_power_cec_error_passes_through_reason
()
tests/test_diagnostics.py:169
Function
test_set_display_power_error_sentinel_strips_multiline
Multi-line reason on the ERROR: branch — we keep only the last non-empty line so the toast stays one row tall.
tests/test_diagnostics.py:270
Function
test_set_display_power_off_success
()
tests/test_diagnostics.py:160
Function
test_set_display_power_on_success
()
tests/test_diagnostics.py:151
Function
test_set_display_power_subprocess_crash_surfaces_stderr
When stdout is empty and stderr has content (interpreter crash, libcec writing to stderr), the last line of stderr is what reaches the toast —
tests/test_diagnostics.py:203
Function
test_set_display_power_subprocess_crash_with_empty_streams_reports_status
Last-resort fallback: subprocess exits non-zero with no stderr and no stdout. Still has to report something — surface the returncode.
tests/test_diagnostics.py:222
Function
test_set_display_power_timeout_returns_failure_message
()
tests/test_diagnostics.py:178
Function
test_set_display_power_unexpected_stdout_falls_through_to_stdout
No 'OK' / 'ERROR:' sentinel — the helper still has to return something actionable. With non-empty stdout and a clean exit, that becomes the ra
tests/test_diagnostics.py:189
Function
test_set_processing_error_writes_metadata
Direct test of the failure-state contract: error message persisted, is_processing cleared, prior metadata preserved, and the row disabled so t
tests/test_processing.py:564
Function
test_set_total_mem_kb_writes_empty_string_on_unknown
Mirrors set_board_subtype: "unknown RAM" is the empty string, distinguishable from "key never set" but treated identically by the server-side
tests/test_host_agent_board_subtype.py:320
Function
test_set_total_mem_kb_writes_value
A successful detect publishes the integer as a string — redis-py serialises bytes/str natively; integers go through ``str(int)`` for round-tri
tests/test_host_agent_board_subtype.py:307
Function
test_sets_cooldown_after_success
( _mock_post: Any, telemetry_env: None, redis_data: dict[str, str], fake_redis: MagicMock, )
tests/test_telemetry.py:160
Function
test_settings_clamps_screen_rotation
A hand-edited anthias.conf could leave an out-of-range rotation on disk. The endpoint must clamp on read so clients only ever see {0, 90, 180,
tests/test_viewer_api.py:298
Function
test_settings_display_blocked_without_cec
A stale form (or direct curl) against a non-CEC device must short-circuit before the 10 s libcec subprocess ever runs.
tests/test_template_views.py:657
Function
test_settings_display_invalid_state
( set_display_power_mock: Any, client: Client )
tests/test_template_views.py:642
Function
test_settings_display_off
( set_display_power_mock: Any, _cec_available_mock: Any, client: Client, )
tests/test_template_views.py:628
Function
test_settings_display_on
( set_display_power_mock: Any, _cec_available_mock: Any, client: Client, )
tests/test_template_views.py:608
Function
test_settings_display_surfaces_error_message
Failed CEC commands must reach the operator via a flash message (the feedback loop called out in issue #2575).
tests/test_template_views.py:683
Function
test_settings_form_persists_default_duration
End-to-end: change a setting, save, reload, see the new value in the input. Catches form-handler regressions where save returns 200 but the va
tests/test_app.py:1437
Function
test_settings_page_links_to_migration_wizard
The Settings page must surface the entry point — otherwise the operator has no way to discover the wizard.
tests/test_migrate_to_screenly.py:159
Function
test_settings_page_renders
Settings must render top-to-bottom on the marketing viewport without any 5xx body — also the source of the ``settings@Nx.png`` capture.
tests/test_app.py:1416
Function
test_settings_player_name_round_trip
Player name is the simplest free-text setting — save, reload, value sticks, then restore.
tests/test_app.py:1610
Function
test_settings_reboot
(reboot_mock: Any, client: Client)
tests/test_template_views.py:583
Function
test_settings_renders
(client: Client)
tests/test_template_views.py:84
Function
test_settings_requires_internal_auth
()
tests/test_viewer_api.py:276
Function
test_settings_returns_viewer_subset
()
tests/test_viewer_api.py:282
Function
test_settings_save_invalid_default_streaming_duration
The save handler catches ValueError and surfaces it via messages instead of 500ing — exercise the except branch.
tests/test_template_views.py:1731
Function
test_settings_save_round_trip
(client: Client)
tests/test_template_views.py:520
Function
test_settings_save_screen_rotation
Issue #2856 — form path mirrors the v2 PATCH validation.
tests/test_template_views.py:552
Function
test_settings_shutdown
(shutdown_mock: Any, client: Client)
tests/test_template_views.py:594
Function
test_settings_use_the_resilient_middleware
()
tests/test_whitenoise_resilient.py:185
Function
test_setup
(viewer_fixtures: _ViewerFixtures)
tests/test_viewer.py:97
Function
test_setup_reraises_unrelated_busget_error
A dead session bus (Disconnected) is not respawn-worthy — the container restart has to bring up a whole fresh bus.
tests/test_viewer.py:144
Function
test_setup_respawns_webview_when_busget_finds_name_gone
The armv7 init crash can strike between the D-Bus handshake (which made load_browser() return) and setup()'s bus.get — the name is released ag
tests/test_viewer.py:105
Function
test_show_hide_token_toggle
The token input defaults to ``type=password`` so the value doesn't sit on screen for a passerby, but the operator must be able to reveal it on
tests/test_migrate_to_screenly.py:415
Function
test_shuffle_refresh_picks_up_field_edits_when_membership_unchanged
With shuffle on and membership unchanged, the cap-driven refresh must still surface DB-driven field edits (e.g. duration) on the next play-thr
tests/test_scheduler.py:517
Function
test_shutdown
( shutdown_anthias_mock: Any, api_client: APIClient, cleanup_asset_dir: None, )
src/anthias_server/api/tests/test_v1_endpoints.py:155
Function
test_shutdown_anthias_publishes_hostcmd_off_balena
()
tests/test_celery_tasks.py:238
Function
test_shutdown_anthias_uses_balena_supervisor_on_balena
()
tests/test_celery_tasks.py:250
Function
test_shutdown_via_balena_supervisor_uses_post
(monkeypatch: Any)
tests/test_utils.py:244
Function
test_sink_description_is_hw_pipeline_with_rate_cap
()
tests/test_gst_fbdev_player.py:102
Function
test_sink_description_rotation_adds_videoflip
()
tests/test_gst_fbdev_player.py:117
Function
test_skip_buttons_publish_correct_command
Regression for #2821: clicking Next / Previous on the home page must publish the bare ``next`` / ``previous`` token on the ``anthias.viewer``
tests/test_app.py:1781
Function
test_skip_noop_before_scheduler_initialised
A ``reload`` can arrive during the pre-Scheduler wait window (``wait_for_server`` etc.) — must not AttributeError.
tests/test_viewer.py:988
Function
test_skip_noop_when_no_current_asset
Empty playlist → no displayed asset → no DB hit, no skip.
tests/test_viewer.py:973
Function
test_skip_swallows_db_errors
A transient DB failure must not interrupt the asset loop — we just leave the rotation alone for this tick.
tests/test_viewer.py:1001
Function
test_skip_when_current_asset_deactivated
Toggling is_enabled off on the displayed asset must skip.
tests/test_viewer.py:938
Function
test_skip_when_current_asset_deleted
Deleting the currently-displayed asset must set the skip event.
tests/test_viewer.py:922
Function
test_skips_enqueue_when_queue_debounce_held
Pinned: a viewer rotating past an unreachable asset every few seconds would otherwise enqueue a Celery task on every rotation, each one no-opi
tests/test_recheck_endpoint.py:86
Function
test_skips_in_ci
(mock_post: Any, telemetry_env: None)
tests/test_telemetry.py:132
Function
test_skips_when_cooldown_set
( mock_post: Any, telemetry_env: None, redis_data: dict[str, str], )
tests/test_telemetry.py:110
Function
test_skips_when_opted_out
( mock_post: Any, telemetry_env: None, settings_data: dict[str, Any], )
tests/test_telemetry.py:121
Method
test_skips_when_runtime_dir_missing
( self, monkeypatch: pytest.MonkeyPatch )
tests/test_viewer.py:2091
Method
test_spawn_waits_for_socket_before_launching
( self, viewer_fixtures: _ViewerFixtures )
tests/test_viewer.py:2103
Function
test_spawn_webview_once_missing_binary
A missing AnthiasViewer binary raises WebviewBinaryMissingError (permanent), which the retry loop must short-circuit on.
tests/test_viewer.py:266
Function
test_spawn_webview_once_raises_on_early_exit
A process that exits before the handshake surfaces as a WebviewLaunchError (a RuntimeError subclass) and does NOT terminate (it's already dead
tests/test_viewer.py:222
Function
test_spawn_webview_once_terminates_on_timeout
When the handshake never arrives, the half-started process is torn down (terminate) before the error is raised — otherwise a retry would leak
tests/test_viewer.py:243
Function
test_splash_built_bundle_resolves_on_static_path
Build-artifact check, integration-only because the unit job runs before bin/prepare_test_environment.sh (which is what invokes `bun run build`
tests/test_splash_page.py:469
Function
test_splash_renders_200_without_mocking_anything
Pinned regression: the prior render called ``ipaddress.ip_address(get_node_ip())`` and 500'd on 'Unknown'. The view now does no IP work at all
tests/test_splash_page.py:415
Function
test_splash_renders_with_polling_script
The splash relies on the JS poll to populate IPs. If the script tag goes missing (template refactor, CSP, etc.), the page would forever show '
tests/test_splash_page.py:440
Function
test_splash_template_references_built_bundle
Template-only check: the splash points at dist/js/splash.js rather than carrying its old inline IIFE. A template refactor that dropped the <sc
tests/test_splash_page.py:452
Function
test_splash_view_does_not_import_get_node_ip
Belt-and-suspenders: assert the splash view module no longer carries get_node_ip in its namespace. A future refactor that re-imports it (and m
tests/test_splash_page.py:425
Function
test_stale_tmp_is_removed
A .tmp older than 1h is an abandoned upload and gets swept.
tests/test_celery_tasks.py:89
Function
test_stale_ytdl_sidecar_is_removed
Old sidecars from abandoned downloads should not pile up.
tests/test_celery_tasks.py:144
Function
test_static_with_mime_allows_rfc1918_clients
( factory: RequestFactory, static_root: Path, remote_addr: str )
tests/test_views_files.py:240
Function
test_static_with_mime_blocks_public_client
( factory: RequestFactory, static_root: Path )
tests/test_views_files.py:247
Function
test_static_with_mime_default_octet_stream_for_unknown_extension
( factory: RequestFactory, static_root: Path )
tests/test_views_files.py:279
Function
test_static_with_mime_directory_request_404
( factory: RequestFactory, static_root: Path )
tests/test_views_files.py:310
Function
test_static_with_mime_disallowed_type_falls_back_to_guess
A disallowed ?mime= must not be honoured (XSS prevention).
tests/test_views_files.py:266
Function
test_static_with_mime_missing_file
( factory: RequestFactory, static_root: Path )
tests/test_views_files.py:300
Function
test_static_with_mime_query_overrides_to_allowed_type
( factory: RequestFactory, static_root: Path )
tests/test_views_files.py:254
Function
test_static_with_mime_traversal_blocked
( factory: RequestFactory, static_root: Path )
tests/test_views_files.py:292
Function
test_stop_calls_browser_bus_stop_video
(mpv: _MPVFixtures)
tests/test_media_player.py:195
Function
test_stop_kills_process_group
(gstfb: _GstFixtures)
tests/test_media_player.py:672
Function
test_stop_playback_sets_module_loop_flag
stop must flip the module-level loop_is_stopped that start_loop reads (the old setattr(__main__, ...) wrote a dead namespace).
tests/test_viewer.py:2264
Method
test_stop_uses_injected_wrapper
(self, mpv: _MPVFixtures)
tests/test_media_player.py:1031
Function
test_stop_without_bus_is_safe
(mpv: _MPVFixtures)
tests/test_media_player.py:211
Function
test_stop_without_play_is_safe
(mpv: _MPVFixtures)
tests/test_media_player.py:202
Function
test_stream_backup_round_trips_through_recover
( backup_home: str, )
tests/test_backup_helper.py:83
Function
test_stream_backup_stops_when_consumer_disconnects
( backup_home: str, )
tests/test_backup_helper.py:113
Function
test_string_to_bool_invalid_raises
(value: str)
tests/test_utils.py:122
Function
test_string_to_bool_valid
(value: Any, expected: bool)
tests/test_utils.py:117
Function
test_subscriber_dispatches_command_with_parameter
()
tests/test_messaging.py:188
Function
test_subscriber_dispatches_command_without_parameter
()
tests/test_messaging.py:197
Function
test_subscriber_falls_back_to_unknown_handler
()
tests/test_messaging.py:238
Function
test_subscriber_loop_calls_set_board_subtype
The ``subscriber_loop`` orchestration must call ``set_board_subtype`` *and* ``set_total_mem_kb`` before flipping ``host_agent_ready`` — otherw
tests/test_host_agent_board_subtype.py:191
Function
test_subscriber_no_handler_when_unknown_missing
()
tests/test_messaging.py:247
Function
test_subscriber_run_signals_ready_then_exits_on_loop_break
run() should call subscribe(), set the readiness flag, and consume. We fake _consume to raise once it's called so the outer while loop exits
tests/test_messaging.py:255
Function
test_subscriber_skips_messages_with_empty_body
()
tests/test_messaging.py:218
Function
test_subscriber_skips_messages_with_wrong_topic
()
tests/test_messaging.py:207
Function
test_subscriber_skips_non_string_data
()
tests/test_messaging.py:227
Method
test_success_returns_screenly_id
( self, migrate_mock: MagicMock, api_client: APIClient, migrate_url: str,
src/anthias_server/api/tests/test_screenly_migration.py:569
Method
test_survives_corrupted_subtree_and_serves_the_rest
( self, tmp_path: Path, caplog: pytest.LogCaptureFixture )
tests/test_whitenoise_resilient.py:142
Function
test_swallows_connection_error_and_skips_cooldown
( _mock_post: Any, telemetry_env: None, redis_data: dict[str, str], )
tests/test_telemetry.py:139
Function
test_swallows_timeout
( _mock_post: Any, telemetry_env: None, redis_data: dict[str, str], )
tests/test_telemetry.py:150
Function
test_sweep_local_file_existence_check
Local URIs short-circuit url_fails and check the filesystem.
tests/test_celery_tasks.py:381
Function
test_sweep_lock_prevents_overlap
A second beat tick that fires while a sweep is running must be a no-op. Without the lock, two workers would race on the same asset rows; in pr
tests/test_celery_tasks.py:424
Function
test_sweep_lock_release_does_not_clobber_different_holder
Pathological: TTL expires while sweep A is still running, sweep B acquires the (now-free) lock with a fresh token, then sweep A finishes and h
tests/test_celery_tasks.py:442
Function
test_sweep_lock_released_after_clean_run
The finally clause must release the lock so the next beat tick can run.
tests/test_celery_tasks.py:470
Function
test_sweep_marks_reachable_when_url_succeeds
(eager_celery: None)
tests/test_celery_tasks.py:318
← previous
next →
1,601–1,700 of 1,832, ranked by callers