MCPcopy Create free account

hub / github.com/Screenly/Anthias / functions

Functions1,832 in github.com/Screenly/Anthias

Functiontest_displayable_missing_is_reachable_defaults_to_displayable
Backstop for legacy rows / serializers that don't include the field. Don't silently freeze a playlist on an upgrade.
tests/test_viewer.py:784
Functiontest_displayable_remote_uri_consults_is_reachable
()
tests/test_viewer.py:772
Functiontest_displayable_skip_asset_check_short_circuits
skip_asset_check=True means the operator opted out of any gating — display unconditionally, even if is_reachable=False.
tests/test_viewer.py:731
Functiontest_download_remote_video_asset_accepts_octet_stream
Some CDNs serve video files as ``application/octet-stream``. Accept it — ffprobe in the chained normalize step is the real arbiter of containe
tests/test_celery_tasks.py:1322
Functiontest_download_remote_video_asset_empty_content_type_aborts
A 200 OK with no Content-Type header is a stronger signal of a misbehaving origin than evidence of a real video. Accepting it would let an HTM
tests/test_celery_tasks.py:1349
Functiontest_download_remote_video_asset_http_404_propagates_for_on_failure
A non-2xx response raises ``RemoteVideoDownloadError``. Celery routes the exception through ``_DownloadRemoteVideoTask.on_failure`` which clea
tests/test_celery_tasks.py:1251
Functiontest_download_remote_video_asset_manifest_content_type_aborts
Defence in depth: even if the serializer's HEAD probe said the URL was a single file, an origin that serves an HLS manifest on GET must be rej
tests/test_celery_tasks.py:1275
Functiontest_download_remote_video_asset_no_op_for_missing_row
Row deleted between dispatch and pickup — task returns cleanly without hitting the network.
tests/test_celery_tasks.py:1404
Functiontest_download_remote_video_asset_no_op_when_row_already_finalized
A duplicate task firing for a row whose first invocation already cleared is_processing must not re-download or stomp on operator-edited state.
tests/test_celery_tasks.py:1417
Functiontest_download_remote_video_asset_on_failure_writes_error_metadata
When Celery declares the task failed, is_processing must flip back to False AND ``metadata.error_message`` must carry the exception class + me
tests/test_celery_tasks.py:1470
Functiontest_download_remote_video_asset_refuses_row_with_empty_uri
The serializer is the source of truth for the destination path — it stamps ``Asset.uri`` at ``<assetdir>/<id><ext>`` before dispatching, picki
tests/test_celery_tasks.py:1430
Functiontest_download_remote_video_asset_size_cap_aborts
A payload that streams past ``REMOTE_VIDEO_MAX_BYTES`` raises inside the task body. The ``.part`` file must be cleaned up so a multi-GB partia
tests/test_celery_tasks.py:1218
Functiontest_download_remote_video_asset_success_chains_into_normalize
Happy path: requests streams a small payload to the row's persisted ``uri``, metadata gets stamped with ``source='remote_url'`` and ``source_u
tests/test_celery_tasks.py:1175
Functiontest_download_remote_video_asset_wrong_content_type_aborts
``Content-Type: text/html`` on the GET response — most likely a 200-OK error page from a misbehaving origin. Reject rather than store the HTML
tests/test_celery_tasks.py:1300
Functiontest_download_remote_video_asset_zero_bytes_aborts
A 200 OK with an empty body almost certainly means the origin is broken; storing an empty file would just queue a row that the viewer would re
tests/test_celery_tasks.py:1378
Functiontest_download_youtube_asset_backfills_uri_when_row_uri_missing
Defensive: if the row landed without a uri (e.g. a custom caller skipped the serializer's path-stamping), the task uses the recomputed destina
tests/test_celery_tasks.py:836
Functiontest_download_youtube_asset_failure_propagates_for_on_failure
yt-dlp DownloadError is permanent — the task re-raises so Celery's on_failure path runs (which clears is_processing).
tests/test_celery_tasks.py:947
Functiontest_download_youtube_asset_floors_subsecond_duration_to_one
A sub-second clip must not slot a 0s rotation entry.
tests/test_celery_tasks.py:871
Functiontest_download_youtube_asset_handles_missing_duration
Live streams / radio uploads omit duration. Persist what we have (title) without overwriting the placeholder duration. Row stays ``is_processi
tests/test_celery_tasks.py:889
Functiontest_download_youtube_asset_no_op_for_missing_row
Row deleted between dispatch and pickup — task returns cleanly without invoking yt-dlp at all.
tests/test_celery_tasks.py:914
Functiontest_download_youtube_asset_no_op_when_row_already_finalized
A duplicate task firing for a row whose first invocation already cleared is_processing must not re-download or stomp on operator-edited state.
tests/test_celery_tasks.py:926
Functiontest_download_youtube_asset_on_failure_writes_error_metadata
When Celery declares the task failed, is_processing must flip back to False AND ``metadata.error_message`` must carry the exception type + mes
tests/test_celery_tasks.py:960
Functiontest_download_youtube_asset_pi3_prefers_h264_format
Pi 3 supports H.264 only; format_sort must request h264.
tests/test_celery_tasks.py:1063
Functiontest_download_youtube_asset_pi4_prefers_h264_format
Pi 4 hardware-decodes both H.264 and HEVC, so it keeps the H.264 preference — H.264 is more widely available on YouTube and Pi 4 plays it just
tests/test_celery_tasks.py:1021
Functiontest_download_youtube_asset_pi5_prefers_hevc_format
Pi 5 biases yt-dlp toward HEVC — it is the hardware decode path (VideoCore VII). H.264 is accepted as a software fallback (GH #3092) but HEVC
tests/test_celery_tasks.py:995
Functiontest_download_youtube_asset_success_chains_into_normalize_video
Happy path: extract_info returns populated info; the YouTube task writes title + duration + ``metadata['source']`` / ``metadata['source_url']`
tests/test_celery_tasks.py:744
Functiontest_download_youtube_asset_unknown_board_falls_back_to_h264
An unrecognised DEVICE_TYPE yields an empty HW codec set; the task must not crash and must fall back to the h264 preference so the download st
tests/test_celery_tasks.py:1082
Functiontest_download_youtube_asset_writes_to_persisted_uri
The output path passed to yt-dlp must be the row's persisted uri, not a fresh recomputation from settings['assetdir']. If assetdir was changed
tests/test_celery_tasks.py:797
Functiontest_download_youtube_asset_x86_prefers_h264_format
x86 keeps the H.264 preference — HEVC via VAAPI is known to produce a black screen on x86, so biasing toward HEVC downloads would cause silent
tests/test_celery_tasks.py:1042
Functiontest_drag_reorders_play_order
The vanilla pointer-events drag we replaced SortableJS with must move both the visible row and the persisted play_order.
tests/test_app.py:1375
Functiontest_drm_resolution_picks_first_connected_mode
A /sys/class/drm/card?-HDMI-A-1 dir reads as 'connected' with a 1920x1080 mode → _drm_resolution() returns '1920x1080'.
tests/test_utils.py:287
Methodtest_drops_auth_settings_error
(self)
tests/test_sentry.py:137
Methodtest_drops_cancelled_error
(self)
tests/test_sentry.py:127
Methodtest_drops_redis_connection_error
(self)
tests/test_sentry.py:43
Methodtest_drops_redis_timeout_error
(self)
tests/test_sentry.py:57
Methodtest_drops_wrapped_redis_connection_error
(self)
tests/test_sentry.py:77
Functiontest_edit_availability_window_with_12_hour_datetime_picker
The Start / End availability pickers post the full "06/15/2026 02:30 PM" shape under the default 12-hour clock — saving must succeed and land
tests/test_app.py:1162
Functiontest_edit_changes_duration
(reset_assets: None, page: Page)
tests/test_app.py:782
Functiontest_edit_duration_disabled_for_video
Video duration is owned by the ffprobe pipeline; the edit form must render it disabled so the probed value can't be clobbered.
tests/test_app.py:910
Functiontest_edit_modal_cancel_discards_changes
( reset_assets: None, page: Page )
tests/test_app.py:932
Functiontest_edit_modal_opens_with_asset
(reset_assets: None, page: Page)
tests/test_app.py:762
Functiontest_edit_play_days_and_clear_play_window
The weekday picker persists a play_days subset, and clearing both time fields resets the day-parting window to all-day.
tests/test_app.py:1213
Functiontest_edit_play_window_with_12_hour_time_picker
Regression for issue #2988: with the default 12-hour clock, the Play from / Play until Flatpickr pickers post "02:30 PM"-shaped values, which
tests/test_app.py:1120
Functiontest_edit_refresh_interval_hidden_for_non_webpage
( reset_assets: None, page: Page )
tests/test_app.py:898
Functiontest_edit_renames_asset
(reset_assets: None, page: Page)
tests/test_app.py:807
Functiontest_edit_save_shows_success_toast
Whichever submit path fires (htmx HX-Trigger or full-page redirect + Django messages), a success toast must surface.
tests/test_app.py:825
Functiontest_edit_toggles_nocache_and_skip_asset_check
The two Advanced switches post hidden-false/checkbox-true pairs that _checkbox() resolves — both directions must persist.
tests/test_app.py:842
Functiontest_edit_webpage_refresh_interval_persists
The auto-refresh field renders for webpage assets only and lands in metadata.refresh_interval_s — feature #2813's UI path.
tests/test_app.py:870
Functiontest_empty
(viewer_fixtures: _ViewerFixtures)
tests/test_viewer.py:84
Functiontest_empty_library_shows_empty_state
A device with no assets should land on a friendly empty state in the picker — not a broken table.
tests/test_migrate_to_screenly.py:397
Functiontest_empty_state_has_back_button
A device with no assets should still offer a way back to the token step — without it the operator is stranded on the picker.
tests/test_migrate_to_screenly.py:434
Functiontest_empty_state_when_no_assets
(reset_assets: None, page: Page)
tests/test_app.py:487
Methodtest_empty_timezone_file
(self, tmp_path: Path)
tests/test_django_timezone.py:66
Functiontest_enable_basic_auth
Auth disabled → enable: a User row gets created with the posted credentials, and settings['auth_backend'] flips to 'auth_basic'. Credentials l
src/anthias_server/api/tests/test_v2_endpoints.py:188
Functiontest_endpoint_is_unauthenticated
The splash page itself is unauth'd and the data is already disclosed there, so the polling endpoint is unauth'd too. This test pins the choice
tests/test_splash_page.py:390
Functiontest_endpoint_returns_200_with_empty_list_on_cache_miss
Pinned regression: prior code 500'd when get_node_ip() returned 'Unknown'. New code never raises — empty cache → [].
tests/test_splash_page.py:372
Functiontest_endpoint_returns_200_with_ip_list
( bare_metal_no_pending: None, )
tests/test_splash_page.py:354
Functiontest_enqueues_task_when_no_lock_held
Fresh asset, no recent recheck: SETNX succeeds → enqueue.
tests/test_recheck_endpoint.py:71
Functiontest_error_template_renders_without_request_context
500.html in particular renders with no RequestContext (no context processors, no `request`). All four must render with an empty context — that
tests/test_error_pages.py:41
Functiontest_every_supported_board_has_device_tags
()
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:303
Functiontest_exceeds_low_ram_pixel_cap_high_ram_returns_false
High-RAM devices never hit the cap, even for >1080p sources.
tests/test_processing.py:1332
Functiontest_exceeds_low_ram_pixel_cap_unknown_dims_returns_false
ffprobe-failed uploads (``video_width=None``) skip the resolution gate — the codec gate already collapsed to ``unknown`` and will reject them;
tests/test_processing.py:1319
Methodtest_falls_back_to_create_when_lookup_fails
( self, get_mock: MagicMock, post_mock: MagicMock )
src/anthias_server/api/tests/test_screenly_migration.py:250
Methodtest_false_on_compose_installs
( self, monkeypatch: pytest.MonkeyPatch )
tests/test_sentry.py:258
Functiontest_fb_geometry_falls_back_to_sysfs
()
tests/test_media_player.py:722
Functiontest_fb_geometry_prefers_vscreeninfo_ioctl
()
tests/test_media_player.py:693
Functiontest_fb_resolution_handles_missing
( monkeypatch: pytest.MonkeyPatch, )
tests/test_utils.py:326
Functiontest_fb_resolution_parses_comma_pair
( monkeypatch: pytest.MonkeyPatch, )
tests/test_utils.py:315
Functiontest_fetch_latest_release_tag_5xx_triggers_backoff
( github_env: None, redis_data: dict[str, str] )
tests/test_github.py:103
Functiontest_fetch_latest_release_tag_backoff_skips_fetch
( github_env: None, redis_data: dict[str, str] )
tests/test_github.py:69
Functiontest_fetch_latest_release_tag_cache_hit
( github_env: None, redis_data: dict[str, str] )
tests/test_github.py:60
Functiontest_fetch_latest_release_tag_happy_path
( github_env: None, redis_data: dict[str, str] )
tests/test_github.py:78
Functiontest_fetch_latest_release_tag_invalid_json
( github_env: None, redis_data: dict[str, str] )
tests/test_github.py:111
Functiontest_fetch_latest_release_tag_missing_tag_name
( github_env: None, redis_data: dict[str, str] )
tests/test_github.py:124
Functiontest_fetch_latest_release_tag_non_string_tag_name
( github_env: None, redis_data: dict[str, str] )
tests/test_github.py:134
Functiontest_fetch_latest_release_tag_request_exception
( github_env: None, redis_data: dict[str, str] )
tests/test_github.py:91
Functiontest_fetch_latest_release_tag_unparseable_tag_name
An upstream tag like ``nightly`` must not be cached: with a 24h TTL, caching it would pin is_up_to_date() to the fallback verdict for a day ev
tests/test_github.py:144
Functiontest_ffmpeg_recipe_includes_scale_clause_when_capping
``cap_to_1080p=True`` injects the ``-vf scale=1920:1080:force_original_aspect_ratio=decrease`` clause between the input and the codec argument
tests/test_processing.py:1252
Functiontest_ffmpeg_recipe_omits_scale_clause_by_default
The codec-only rejection path passes ``cap_to_1080p=False`` (the default). Recipe must NOT include a scale clause then — we don't want to sugg
tests/test_processing.py:1242
Functiontest_ffmpeg_recipe_quotes_hostile_filenames
``_ffmpeg_reencode_recipe`` must round-trip any filename through ``shlex`` so a user-supplied ``upload_name`` can't break out of the recipe's
tests/test_processing.py:896
Functiontest_ffprobe_streams_parses_json
()
tests/test_processing.py:2129
Functiontest_ffprobe_summary_extracts_duration_from_probe_payload
The runner reuses ``summary['duration_seconds']`` on the passthrough path so we don't shell ffprobe twice. Confirm the helper extracts ``forma
tests/test_processing.py:1556
Functiontest_ffprobe_summary_falls_back_to_extension_when_format_missing
When ffprobe doesn't populate ``format.format_name`` (older ffprobe builds, malformed input), fall back to the filename extension so we still
tests/test_processing.py:1518
Functiontest_ffprobe_summary_handles_missing_ffprobe_binary
A stripped-down container or dev box without ffprobe in PATH must not crash the normalisation task. ``sh.CommandNotFound`` is raised before an
tests/test_processing.py:1621
Functiontest_ffprobe_summary_handles_missing_streams
A probe response missing audio/video streams is reported as 'none' (audio absent — passthrough OK if the rest matches) or 'unknown' (video abs
tests/test_processing.py:1397
Functiontest_ffprobe_summary_handles_no_audio_track
()
tests/test_processing.py:1419
Functiontest_ffprobe_summary_handles_probe_failure
Probe errors (corrupt file, ffprobe missing) must not crash the task — they downgrade to 'unknown' so the caller falls through to transcode.
tests/test_processing.py:1529
Functiontest_ffprobe_summary_parses_video_fps
``video_fps`` is the average frame rate parsed from ffprobe's ``r_frame_rate`` rational. The envelope transcode uses it to decide when to emit
tests/test_processing.py:1451
Functiontest_ffprobe_summary_prefers_extension_match_in_synonym_list
ffprobe's ``format_name`` for the QuickTime family is a synonym list (e.g. ``mov,mp4,m4a,3gp,3g2,mj2``). Operator-facing metadata should match
tests/test_processing.py:1476
Functiontest_file_asset
(api_client: APIClient, cleanup_asset_dir: None)
src/anthias_server/api/tests/test_v1_endpoints.py:55
Methodtest_fires_via_env_not_board_helper
( self, monkeypatch: pytest.MonkeyPatch, tmp_path: Any, caplog: pytest.LogCapt
tests/test_viewer.py:2033
Functiontest_first_non_loopback_mac_skips_docker
( monkeypatch: pytest.MonkeyPatch, )
tests/test_utils.py:393
Functiontest_force_dark_flag_renders_web_page_dark
"Prefer dark mode" on: the Chromium switch the webview injects must darken an otherwise-white page.
tests/test_webview_dark_mode.py:94
Functiontest_format_drops_garbage_tokens
Belt-and-suspenders: a malformed input must not crash a consumer. Valid IPs in the same string still pass through.
tests/test_splash_page.py:82
Functiontest_format_ipv4
()
tests/test_splash_page.py:64
Functiontest_format_ipv6_in_brackets
()
tests/test_splash_page.py:70
Functiontest_format_multiple_space_separated
()
tests/test_splash_page.py:76
Functiontest_format_returns_empty_for_unable_sentinel
Bare-metal mode: host_agent didn't populate Redis in time.
tests/test_splash_page.py:59
Functiontest_format_returns_empty_for_unknown_sentinel
Balena first-boot mode: supervisor responded but with no IP.
tests/test_splash_page.py:54
Functiontest_format_subprocess_stderr_byte_trim_handles_multibyte_utf8
The trim is documented as a byte limit; multibyte characters in the keep window must not push the decoded string over the limit. Edge case: tr
tests/test_processing.py:1600
← previousnext →1,101–1,200 of 1,832, ranked by callers