MCPcopy Create free account

hub / github.com/Screenly/Anthias / functions

Functions1,832 in github.com/Screenly/Anthias

Functiontest_build_webview_env_removes_stale_rotation_when_dialed_to_zero
If a previous launch set rotation=90 in QT_QPA_PLATFORM and the operator now picks 0° from the dropdown, the rotation= option must come back o
tests/test_viewer.py:1379
Functiontest_build_webview_env_sets_dark_mode_flag_when_enabled
()
tests/test_viewer.py:1088
Functiontest_build_webview_env_sets_eglfs_rotation
Pi 4 runs eglfs, which ignores the linuxfb ``:rotation=N`` plugin option (that silent no-op was the 2026.06.0 bug). eglfs reads QT_QPA_EGLFS_R
tests/test_viewer.py:1405
Functiontest_build_webview_env_sets_ua_token
()
tests/test_viewer.py:1120
Functiontest_build_webview_env_strips_existing_rotation_suffix
If a prior launch (or the Dockerfile) baked in a rotation, the helper must not double-append.
tests/test_viewer.py:1307
Functiontest_bulk_forms_use_global_event_bridge_not_alpine_methods
hx-on::after-request runs in global JS scope, so the bulk forms must NOT call Alpine component methods there (that throws ReferenceError and t
tests/test_template_views.py:1639
Methodtest_busy_timeout_is_set
(self)
tests/test_django_db_settings.py:18
Functiontest_cap_driven_refresh_preserves_shuffle_play_through
With shuffle_playlist on, the ~60s windowed-asset deadline cap must not reshuffle mid-cycle. Membership is unchanged, so the Scheduler should
tests/test_scheduler.py:483
Functiontest_cec_available_false_when_neither_present
()
tests/test_diagnostics.py:299
Functiontest_cec_available_true_when_cec0_present
()
tests/test_diagnostics.py:285
Functiontest_cec_available_true_when_vchiq_present
()
tests/test_diagnostics.py:292
Methodtest_celery_reconnect_logger_is_ignored
(self)
tests/test_sentry.py:168
Functiontest_check_get_db_mtime
(restore_shuffle_setting: None)
tests/test_scheduler.py:201
Functiontest_classify_bare_url_falls_back_to_head_probe_video
No extension on the URL, but HEAD reports ``Content-Type: video/mp4`` → auto-download with the inferred extension.
tests/test_remote_video.py:200
Functiontest_classify_empty_uri_returns_stream
()
tests/test_remote_video.py:180
Functiontest_classify_head_probe_html_returns_stream
HEAD reports ``Content-Type: text/html`` (a 404 page, a JSON error envelope's text/html landing page, ...) → stay as stream URL. The download
tests/test_remote_video.py:215
Functiontest_classify_head_probe_http_error_returns_stream
HEAD returns 4xx → stay as stream URL. Some origins respond 405 Method Not Allowed to HEAD; either way, downgrading to stream-mode keeps the c
tests/test_remote_video.py:247
Functiontest_classify_head_probe_manifest_content_type_returns_stream
Some HLS origins serve ``application/vnd.apple.mpegurl`` from URLs without a ``.m3u8`` extension. Reject those at the HEAD probe — downloading
tests/test_remote_video.py:231
Functiontest_classify_head_probe_network_failure_returns_stream
Any network exception during the HEAD probe → stay as stream URL. The classifier is best-effort; we never block the create call on a flaky ori
tests/test_remote_video.py:272
Functiontest_classify_head_probe_uses_short_timeout
The synchronous HEAD probe must run with the documented 5s timeout — operators are blocking on the POST /assets call. Any drift in the timeout
tests/test_remote_video.py:289
Functiontest_classify_known_video_extension_returns_download
A URL whose path ends in a known single-file video container auto-downloads with the matching local extension. No HEAD call fires — extension
tests/test_remote_video.py:53
Functiontest_classify_non_http_scheme_returns_stream
Non-http(s)/non-streaming schemes (file://, ftp://, ...) get the negative classify. The classifier deliberately refuses to download from anyth
tests/test_remote_video.py:169
Functiontest_classify_streaming_manifest_extensions_return_stream
HLS / DASH / SmoothStreaming manifests never auto-download — they describe a stream, not a single file. No HEAD call (the extension match shor
tests/test_remote_video.py:75
Functiontest_classify_streaming_scheme_with_mp4_path_returns_stream
``rtsp://camera/feed.mp4`` is RTSP. Path extension does not promote it to an http(s) download.
tests/test_remote_video.py:109
Functiontest_classify_streaming_schemes_return_stream
RTSP / SRT / UDP / MMS are streaming-by-construction, even if the URL's path happens to end in ``.mp4``. The viewer plays them live via QtMult
tests/test_remote_video.py:97
Functiontest_cleanup_returns_when_assetdir_missing
cleanup() bails early if settings['assetdir'] doesn't exist.
tests/test_celery_tasks.py:153
Functiontest_clear_framebuffer_is_best_effort
()
tests/test_gst_fbdev_player.py:153
Functiontest_clear_framebuffer_writes_stride_times_height
()
tests/test_gst_fbdev_player.py:128
Functiontest_client_ip_handles_ipv6
(factory: RequestFactory)
tests/test_views_files.py:43
Functiontest_client_ip_raises_for_malformed
(factory: RequestFactory)
tests/test_views_files.py:48
Functiontest_client_ip_raises_for_missing
(factory: RequestFactory)
tests/test_views_files.py:54
Functiontest_client_ip_reads_remote_addr
(factory: RequestFactory)
tests/test_views_files.py:38
Functiontest_compute_fit_dims_degrades_to_fullscreen_on_bad_input
()
tests/test_gst_fbdev_player.py:61
Functiontest_compute_fit_dims_honours_anamorphic_par
()
tests/test_gst_fbdev_player.py:53
Functiontest_compute_fit_dims_square_pixels
( src: tuple[int, int], fb: tuple[int, int], expected: tuple[int, int], )
tests/test_gst_fbdev_player.py:45
Functiontest_conf_rewrite_handles_absolute_paths
(home_dir: str)
tests/test_migrate_legacy_paths.py:109
Functiontest_consume_pending_rotation_bounce_no_op_when_flag_clear
Most ticks have no pending bounce — must not touch the browser; otherwise every asset_loop iteration would kill it.
tests/test_viewer.py:1758
Functiontest_consume_pending_rotation_bounce_terminates_browser
The main-thread half of the handoff: when the flag is set, terminate the webview and clear current_browser_url so the next view_*() call respa
tests/test_viewer.py:1741
Methodtest_control_chars_replaced
(self)
src/anthias_server/api/tests/test_screenly_migration.py:111
Functiontest_counter_should_increment_after_full_asset_loop
( restore_shuffle_setting: None, )
tests/test_scheduler.py:185
Functiontest_cpu_brand_strips_marketing
(monkeypatch: pytest.MonkeyPatch)
tests/test_template_views.py:2286
Functiontest_create_asset_should_return_201
( api_client: APIClient, version: str )
src/anthias_server/api/tests/test_assets.py:81
Functiontest_create_heic_image_dispatches_normalize_task_on_v1_2_and_v2
HEIC uploads route through ``normalize_image_asset`` on v1.2 / v2 only — image normalisation deliberately stays opt-in for the older endpoints
src/anthias_server/api/tests/test_assets.py:712
Functiontest_create_heic_image_does_not_dispatch_on_legacy_endpoints
v1 / v1.1 deliberately do NOT route HEIC uploads through the image-normalize pipeline. Image normalisation is opt-in via v1.2 / v2 — promoting
src/anthias_server/api/tests/test_assets.py:922
Functiontest_create_remote_video_url_dispatches_download_task
POSTing a http(s) URL pointing at a single-file video container (.mp4 in this test) on v1.2 / v2 must rewrite the row to a local destination p
src/anthias_server/api/tests/test_assets.py:769
Functiontest_create_remote_video_url_keeps_literal_uri_on_legacy_endpoints
v1 / v1.1 deliberately do NOT auto-download remote video URLs — they preserve the literal-URL semantics older clients depend on, matching how
src/anthias_server/api/tests/test_assets.py:817
Functiontest_create_stream_uri_stays_as_literal
Stream URLs (HLS manifests, RTSP feeds, ...) must NOT be auto-downloaded — they describe a live stream rather than a single file. The serializ
src/anthias_server/api/tests/test_assets.py:873
Functiontest_create_video_asset_dispatches_normalize_task
Every API version that accepts a local video upload must dispatch ``normalize_video_asset`` after persisting the row. Regression test for GH
src/anthias_server/api/tests/test_assets.py:628
Functiontest_create_video_asset_v2_with_non_zero_duration_should_fail
Test that v2 rejects video assets with non-zero duration.
src/anthias_server/api/tests/test_assets.py:102
Functiontest_create_youtube_asset_dispatches_celery_task
Every API version that accepts ``mimetype='youtube_asset'`` must dispatch ``download_youtube_asset`` after persisting the row. v1.2 was previo
src/anthias_server/api/tests/test_assets.py:496
Methodtest_creates_group_when_lookup_empty
( self, get_mock: MagicMock, post_mock: MagicMock )
src/anthias_server/api/tests/test_screenly_migration.py:236
Functiontest_cross_host_origin_still_rejected
()
tests/test_csrf.py:128
Functiontest_date_format_round_trip_in_edit_modal
Switch the device to dd/mm/yyyy: the availability pickers must format AND parse in that shape, so saving a typed d/m/Y datetime lands the righ
tests/test_app.py:1571
Functiontest_day_parted_asset_renders_schedule_chips
A weekday-filtered, day-parted asset must render its weekday and time-window chips on the table row (12-hour clock default).
tests/test_app.py:1286
Functiontest_deadline_never_lands_in_the_past
A windowed-but-currently-inactive asset must not poison the deadline with its long-past start_date — that would cause refresh_playlist() to fi
tests/test_scheduler.py:424
Functiontest_default_handler_returns_branded_body
Django's default 4xx handlers render `<code>.html` from the project template path. This bypasses URL routing and goes straight at the handler
tests/test_error_pages.py:73
Functiontest_default_port_origin_vs_non_default_host_port_rejected
``Origin: https://anthias.local`` (port 443) posting to a server on ``Host: anthias.local:8000`` is a cross-origin request even though one sid
tests/test_csrf.py:110
Functiontest_default_route_iface_picks_up_flag_set
( monkeypatch: pytest.MonkeyPatch, )
tests/test_utils.py:343
Functiontest_default_route_iface_skips_down_route
( monkeypatch: pytest.MonkeyPatch, )
tests/test_utils.py:357
Functiontest_default_settings
(settings_env: None)
tests/test_settings.py:117
Functiontest_delete_asset_publishes_reload
( publisher_mock: Any, api_client: APIClient, version: str )
src/anthias_server/api/tests/test_assets.py:585
Functiontest_delete_asset_should_return_204
( api_client: APIClient, version: str )
src/anthias_server/api/tests/test_assets.py:183
Functiontest_delete_cancel_keeps_asset
(reset_assets: None, page: Page)
tests/test_app.py:1264
Functiontest_delete_confirm_modal_opens_with_pending_id
( reset_assets: None, page: Page )
tests/test_app.py:1006
Functiontest_delete_confirm_removes_asset
(reset_assets: None, page: Page)
tests/test_app.py:1025
Functiontest_detect_board_subtype
The static device-tree → subtype table is the source of truth for board detection. Any drift between this table and ``compute_envelope``'s exp
tests/test_host_agent_board_subtype.py:58
Functiontest_detect_board_subtype_no_devicetree
A host without ``/proc/device-tree/model`` (dev container, a non-DT bootloader, balena's restricted /proc) collapses cleanly to ``None`` inste
tests/test_host_agent_board_subtype.py:73
Functiontest_detect_hdmi_discovers_non_card1_layouts
DRM card index is probe-order-dependent; HDMI-A-N mapping is stable.
tests/test_media_player.py:443
Functiontest_detect_hdmi_falls_back_on_oserror
()
tests/test_media_player.py:531
Functiontest_detect_hdmi_falls_back_when_no_status_files
()
tests/test_media_player.py:458
Functiontest_detect_hdmi_logs_only_on_transitions
Repeated identical results log at DEBUG; transitions re-log loudly. Guards against log spam since the helper runs on every play()/ set_asset(
tests/test_media_player.py:465
Functiontest_detect_hdmi_prefers_first_port_when_both_connected
()
tests/test_media_player.py:396
Functiontest_detect_hdmi_prefers_hdmi_a_1_across_mixed_card_indices
If card0 hosts HDMI-A-2 and card1 hosts HDMI-A-1, HDMI-A-1 still wins. Guards against accidentally sorting on the full entry name (card0-...
tests/test_media_player.py:410
Functiontest_detect_hdmi_returns_first_connected_port
()
tests/test_media_player.py:382
Functiontest_detect_hdmi_returns_second_port_when_only_it_is_connected
()
tests/test_media_player.py:429
Functiontest_detect_local_mac_prefers_default_route
( monkeypatch: pytest.MonkeyPatch, )
tests/test_utils.py:410
Functiontest_detect_screen_resolution_returns_none_in_headless
Headless host (the test runner) has no /sys/class/drm cards or fb0 — function should return None cleanly so the server falls back to the confi
tests/test_template_views.py:2303
Functiontest_detect_total_mem_kb
The kB count from /proc/meminfo is the source of truth for low-RAM gating. Tests pin the parsing against the kernel's actual formats (space- a
tests/test_host_agent_board_subtype.py:262
Functiontest_detect_total_mem_kb_missing_line
A truncated /proc/meminfo without a MemTotal line returns ``None`` so the caller treats RAM as unknown — same recovery path as a missing /proc
tests/test_host_agent_board_subtype.py:273
Functiontest_detect_total_mem_kb_unparseable_value
A non-integer in the MemTotal field returns ``None`` rather than crashing the host_agent unit.
tests/test_host_agent_board_subtype.py:284
Functiontest_detect_total_mem_kb_unreadable_proc
A host where /proc/meminfo can't be opened (container, balena restricted /proc) returns ``None``.
tests/test_host_agent_board_subtype.py:296
Methodtest_direct_call_when_no_wrapper_injected
( self, mpv: _MPVFixtures )
tests/test_media_player.py:1089
Functiontest_disable_basic_auth
Disabling auth flips ``auth_backend`` back to '' but keeps the User row intact so re-enabling later doesn't force a fresh password. Validating
src/anthias_server/api/tests/test_v2_endpoints.py:255
Functiontest_dispatch_normalize_image_invokes_celery_task
()
tests/test_processing.py:1941
Functiontest_dispatch_normalize_video_invokes_celery_task
()
tests/test_processing.py:1955
Functiontest_dispatch_normalize_video_stamps_processing_started_at
``dispatch_normalize_video`` writes ``metadata.processing_started_at`` so the periodic reconciler can age the row. Regression guard for GH #28
tests/test_processing.py:1967
Functiontest_dispatch_pending_normalize_handles_missing_attribute
A serializer class that doesn't carry ``_pending_normalize`` at all must not crash — defends against a future serializer that doesn't route th
tests/test_processing.py:2043
Functiontest_dispatch_pending_normalize_noop_when_unset
A serializer that didn't flag normalisation (most uploads: JPEG/PNG/H.264) leaves the helper as a no-op — no spurious Celery dispatch.
tests/test_processing.py:2028
Functiontest_dispatch_pending_normalize_routes_image
()
tests/test_processing.py:2016
Functiontest_dispatch_pending_normalize_routes_video
()
tests/test_processing.py:2004
Functiontest_display_power_button_click_surfaces_error_toast
Issue #2575's feedback-loop requirement: a failing CEC command must surface to the operator as a visible toast, not silently succeed or no-op.
tests/test_app.py:1980
Functiontest_display_power_failure_returns_502
( _set_display_power_mock: Any, _cec_available_mock: Any, api_client: APIClient, )
src/anthias_server/api/tests/test_v2_endpoints.py:571
Functiontest_display_power_invalid_state_returns_400
( set_display_power_mock: Any, api_client: APIClient )
src/anthias_server/api/tests/test_v2_endpoints.py:585
Functiontest_display_power_off_success
( set_display_power_mock: Any, _cec_available_mock: Any, api_client: APIClient, )
src/anthias_server/api/tests/test_v2_endpoints.py:550
Functiontest_display_power_on_success
( set_display_power_mock: Any, _cec_available_mock: Any, api_client: APIClient, )
src/anthias_server/api/tests/test_v2_endpoints.py:528
Functiontest_display_power_returns_503_when_no_cec_adapter
The endpoint must fail fast (no 10 s subprocess) when neither /dev/cec0 nor /dev/vchiq exists. 503 telegraphs 'this server lacks the hardware
src/anthias_server/api/tests/test_v2_endpoints.py:601
Functiontest_display_power_section_hidden_without_cec_adapter
No /dev/cec0 or /dev/vchiq in the container by default — the experimental section must NOT render. Guards against accidentally surfacing CEC c
tests/test_app.py:1926
Functiontest_display_power_section_visible_with_cec_adapter
With a CEC device node present, both buttons render under an Experimental badge inside the System controls neighbourhood.
tests/test_app.py:1943
Methodtest_display_power_soft_limit_skips_tick
(self)
tests/test_celery_tasks.py:1904
Functiontest_displayable_local_file_existence_check
Local URIs hit the filesystem directly (cheap, no roundtrip to the server's view of the world).
tests/test_viewer.py:743
← previousnext →1,001–1,100 of 1,832, ranked by callers