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_recheck_skips_processing_asset
( eager_celery_recheck: None, )
tests/test_celery_tasks.py:581
Function
test_recheck_skips_skip_asset_check_asset
Operator opted out of validation; matches sweep behavior of not touching is_reachable / last_reachability_check.
tests/test_celery_tasks.py:595
Method
test_recheck_soft_limit_marks_unreachable
( self, eager_celery_recheck: None )
tests/test_celery_tasks.py:1850
Method
test_recheck_task_has_soft_limit_headroom
(self)
tests/test_celery_tasks.py:1822
Function
test_reconcile_clears_flag_on_unknown_mimetype
A row with a mimetype neither image nor video that's stuck past the threshold has no clear re-dispatch path. Clear the flag and surface an err
tests/test_celery_tasks.py:1650
Function
test_reconcile_lock_prevents_overlap
A second beat tick that fires while the reconciler is running must be a no-op. Mirrors ``revalidate_asset_urls`` behaviour: only one sweep at
tests/test_celery_tasks.py:1770
Function
test_reconcile_lock_released_after_clean_run
The ``finally`` block must release our token so the next beat tick can run.
tests/test_celery_tasks.py:1799
Function
test_reconcile_redispatches_stuck_image
Same recovery path applies to image-mimetype rows.
tests/test_celery_tasks.py:1601
Function
test_reconcile_redispatches_stuck_video
An ``is_processing=True`` video row older than the threshold is re-dispatched through ``dispatch_normalize_video`` — recovers rows whose worke
tests/test_celery_tasks.py:1581
Function
test_reconcile_skips_rows_not_processing
``is_processing=False`` rows aren't the reconciler's business, regardless of any stale ``processing_started_at`` left in metadata from a previ
tests/test_celery_tasks.py:1713
Function
test_reconcile_skips_rows_within_grace_window
A row whose ``processing_started_at`` is younger than the threshold belongs to an in-flight task — leave it alone.
tests/test_celery_tasks.py:1554
Function
test_reconcile_stamps_unstamped_row_on_first_sweep
Legacy / backup-restored rows have no ``metadata.processing_started_at``. The first sweep stamps it so the next sweep can apply the age thresh
tests/test_celery_tasks.py:1623
Function
test_reconcile_treats_malformed_timestamp_as_unstamped
A non-parseable ``processing_started_at`` (e.g. from a hand-edited backup) must follow the same "stamp on first sight" recovery path — never r
tests/test_celery_tasks.py:1684
Function
test_reconcile_treats_naive_timestamp_as_unstamped
A naive (no tzinfo) ISO-8601 string in ``metadata.processing_started_at`` could come from a hand-edited backup. Comparing it against the tz-aw
tests/test_celery_tasks.py:1737
Function
test_recover
(backup_home: str)
tests/test_backup_helper.py:60
Function
test_recover_accepts_legacy_archive
(legacy_home: str)
tests/test_backup_helper.py:240
Function
test_recover_rejects_unrelated_archive
(legacy_home: str)
tests/test_backup_helper.py:253
Function
test_recover_skips_path_traversal_member
A malicious tarball with a `..` member must not write outside $HOME. The required top-level entries are still present, so recover() proceeds,
tests/test_backup_helper.py:273
Method
test_redis_down_logs_warning_not_error
( self, caplog: pytest.LogCaptureFixture )
tests/test_viewer.py:1942
Function
test_referenced_file_is_preserved
Even past the 1h guard, a referenced file must survive.
tests/test_celery_tasks.py:105
Function
test_remote_video_destination_path_preserves_extension
The extension is the caller's responsibility — pass through verbatim. Allows webm/mkv/avi to land with their real container so ffprobe identif
tests/test_remote_video.py:322
Function
test_remote_video_destination_path_uses_assetdir
The local destination lives under settings['assetdir'] so cleanup() recognises the downloaded file as referenced and doesn't sweep it as an or
tests/test_remote_video.py:308
Function
test_reply_collector_blocking_rounds_up_to_next_second
()
tests/test_messaging.py:97
Function
test_reply_collector_blocking_timeout
()
tests/test_messaging.py:110
Function
test_reply_collector_get_instance_creates_once
()
tests/test_messaging.py:162
Function
test_reply_collector_non_blocking_empty_raises_timeout
()
tests/test_messaging.py:141
Function
test_reply_collector_non_blocking_negative_timeout_uses_lpop
()
tests/test_messaging.py:131
Function
test_reply_collector_non_blocking_uses_lpop
()
tests/test_messaging.py:120
Function
test_reply_collector_recv_blocking_returns_decoded_payload
()
tests/test_messaging.py:81
Function
test_reply_collector_singleton_rejects_second_init
()
tests/test_messaging.py:151
Function
test_reply_sender_pushes_json_and_sets_ttl
()
tests/test_messaging.py:69
Function
test_require_client_in_allows_match
(factory: RequestFactory)
tests/test_views_files.py:66
Function
test_require_client_in_rejects_malformed_remote_addr
( factory: RequestFactory, )
tests/test_views_files.py:91
Function
test_require_client_in_rejects_outside_cidr
( factory: RequestFactory, )
tests/test_views_files.py:78
Function
test_require_client_in_with_multiple_cidrs
( factory: RequestFactory, )
tests/test_views_files.py:104
Function
test_resolve_balena_reads_supervisor_response
()
tests/test_splash_page.py:299
Function
test_resolve_balena_returns_empty_on_supervisor_error_status
()
tests/test_splash_page.py:333
Function
test_resolve_balena_returns_empty_on_supervisor_timeout
A slow first-boot supervisor must not block the endpoint.
tests/test_splash_page.py:319
Function
test_resolve_cache_hit_also_kicks_off_refresh
The splash docstring promises 'updates if IPs change during the splash's display window' (e.g. DHCP renewal mid-splash). Honoring that require
tests/test_splash_page.py:121
Function
test_resolve_debounces_repeat_cache_miss_publishes
At a 2s poll cadence, host_agent.set_ip_addresses can take longer than one poll interval (its internal probe is a 10x1s tenacity retry). SETNX
tests/test_splash_page.py:212
Function
test_resolve_empty_list_in_cache_triggers_refresh
host_agent's first run on a still-coming-up network can write ``'[]'`` into the cache. If we treated that as a hit and returned '' without pub
tests/test_splash_page.py:177
Function
test_resolve_handles_malformed_cache_payload
Garbage in the cache (e.g. a partial write or a stray byte from another producer) must not crash the resolver.
tests/test_splash_page.py:162
Function
test_resolve_publish_failure_releases_debounce
If the publish fails (Redis flake), the debounce key would otherwise pin us out of refreshing for the whole TTL — even though no refresh actua
tests/test_splash_page.py:234
Function
test_resolve_publishes_refresh_on_cache_miss
Empty cache: return '' and ask host_agent to populate. The next poll picks it up. Don't block waiting for completion.
tests/test_splash_page.py:142
Function
test_resolve_reads_from_redis_cache
(bare_metal_no_pending: None)
tests/test_splash_page.py:104
Function
test_resolve_redis_get_failure_returns_empty
Redis flake during cache read must not 500 the splash poll. The polling endpoint is on a 2s loop — degrading to '' lets the JS keep polling un
tests/test_splash_page.py:195
Function
test_resolve_setnx_failure_returns_empty
Redis can flake between the get() and the SETNX. Without a guard around SETNX, the polling endpoint would 500 — same 500 we'd already prevente
tests/test_splash_page.py:275
Function
test_retrieve_and_patch_json_adds_device_tags
( mock_requests_get: MagicMock, board: str, expected_tags: list[str] )
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:292
Function
test_retrieve_and_patch_json_converts_sizes_to_int
( mock_requests_get: MagicMock, )
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:235
Function
test_retrieve_and_patch_json_has_all_required_fields
( mock_requests_get: MagicMock, )
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:277
Function
test_retrieve_and_patch_json_marks_maintenance_boards
( mock_requests_get: MagicMock, board: str )
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:250
Function
test_retrieve_and_patch_json_patches_url
( mock_requests_get: MagicMock, )
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:224
Function
test_retrieve_and_patch_json_skips_maintenance_for_modern_boards
( mock_requests_get: MagicMock, board: str )
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:264
Function
test_retry_failed_replays_only_failed_rows
Retry failed must re-run only the failed row, not the whole queue. Tracked via the request count keyed by asset_id.
tests/test_migrate_to_screenly.py:336
Function
test_retry_wayland_rotation_keeps_sentinel_on_failure
A second-attempt failure must NOT latch the new angle — otherwise we'd silently give up on rotation.
tests/test_viewer.py:1856
Function
test_retry_wayland_rotation_recovers_from_startup_failure
Sentinel -1 (set by load_browser when the boot apply failed) must trigger a retry. On success the latch advances to the real angle so subseque
tests/test_viewer.py:1833
Function
test_retry_wayland_rotation_skipped_on_linuxfb
Linuxfb rotation is applied synchronously at QPA init via QT_QPA_PLATFORM, so there's no analogous failure mode — the retry helper must short-
tests/test_viewer.py:1875
Function
test_retry_wayland_rotation_skips_when_already_applied
Cheap early-return when rotation is already where it should be — otherwise asset_loop would push wlr-randr on every tick.
tests/test_viewer.py:1814
Function
test_returns_404_for_unknown_asset
()
tests/test_recheck_endpoint.py:58
Method
test_returns_empty_when_no_device_tree
(self, tmp_path: Path)
tests/test_sentry.py:201
Method
test_returns_existing_id_without_post
( self, get_mock: MagicMock, post_mock: MagicMock )
src/anthias_server/api/tests/test_screenly_migration.py:222
Method
test_returns_false_on_auth_failure
( self, get_mock: MagicMock, code: int )
src/anthias_server/api/tests/test_screenly_migration.py:193
Method
test_returns_immediately_when_socket_present
( self, monkeypatch: pytest.MonkeyPatch, tmp_path: Any )
tests/test_viewer.py:2022
Method
test_returns_none_for_http_url
(self)
src/anthias_server/api/tests/test_screenly_migration.py:136
Method
test_returns_none_for_neighbour_directory
(self)
src/anthias_server/api/tests/test_screenly_migration.py:145
Method
test_returns_none_for_unrelated_path
(self)
src/anthias_server/api/tests/test_screenly_migration.py:142
Method
test_returns_true_on_200
(self, get_mock: MagicMock)
src/anthias_server/api/tests/test_screenly_migration.py:184
Function
test_reuses_persisted_device_id
( mock_post: Any, telemetry_env: None, redis_data: dict[str, str], )
tests/test_telemetry.py:178
Function
test_rotation_value_clamps
(raw: Any, expected: int)
tests/test_viewer.py:1062
Function
test_rtmp_ffprobe_nonzero_exit_returns_true
()
tests/test_utils.py:73
Function
test_rtsp_ffprobe_missing_returns_false
()
tests/test_utils.py:90
Function
test_rtsp_ffprobe_success_returns_false
()
tests/test_utils.py:65
Function
test_rtsp_ffprobe_timeout_returns_true
()
tests/test_utils.py:81
Function
test_safe_local_asset_path_rejects_symlink_escape
A symlink inside assetdir pointing outside it must not be served. realpath resolves the link before the startswith check.
tests/test_template_views.py:2397
Function
test_safe_local_asset_path_rejects_traversal
( tmp_path: Any, rel_path: str, monkeypatch: Any )
tests/test_template_views.py:2380
Function
test_safe_redirect_uri_allowlist
(uri: str, expected: str | None)
tests/test_template_views.py:2371
Function
test_same_host_distinct_non_default_ports_rejected
``Origin: http://anthias.local:8080`` posting to a server on ``Host: anthias.local:8000`` is a cross-origin request even though the host match
tests/test_csrf.py:93
Function
test_same_host_http_origin_passes
()
tests/test_csrf.py:44
Function
test_same_host_https_origin_on_http_passes
The user-reported case in #2867. Browser advertises an ``https://device`` Origin (TLS terminated at a proxy / HSTS leftover / browser HTTPS-Fi
tests/test_csrf.py:57
Function
test_save_settings
(settings_env: None)
tests/test_settings.py:151
Function
test_schedule_pills_everyday_short_circuit
(asset: Asset)
tests/test_template_views.py:2187
Function
test_schedule_window_disabled_overrides_state
()
tests/test_template_views.py:2110
Function
test_schedule_window_live
()
tests/test_template_views.py:2088
Function
test_schedule_window_missing_dates_falls_back
()
tests/test_template_views.py:2162
Function
test_schedule_window_upcoming_and_expired
()
tests/test_template_views.py:2131
Method
test_screenly_rejection_returns_per_asset_error
( self, migrate_mock: MagicMock, api_client: APIClient, migrate_url: str,
src/anthias_server/api/tests/test_screenly_migration.py:597
Method
test_screenly_rejection_surfaces_status_and_detail
( self, post_mock: MagicMock )
src/anthias_server/api/tests/test_screenly_migration.py:400
Function
test_select_none_disables_migrate_button
Migrate button must be disabled when nothing is selected — the backend would 400 on an empty selection too, but UX-wise the button shouldn't e
tests/test_migrate_to_screenly.py:259
Function
test_send_telemetry_task_dispatches
The hourly Celery task is a thin wrapper over anthias_server.lib.telemetry.
tests/test_celery_tasks.py:206
Function
test_send_to_webview_raises_when_retry_also_fails
One respawn-and-retry, then give up: if the freshly spawned webview dies mid-call too, the error escapes so the container restart remains the
tests/test_viewer.py:647
Function
test_sends_event_when_no_cooldown
( mock_post: Any, telemetry_env: None )
tests/test_telemetry.py:68
Function
test_sentry_does_not_send_under_pytest
()
tests/test_sentry.py:20
Method
test_session_carries_anthias_user_agent
(self)
src/anthias_server/api/tests/test_screenly_migration.py:167
Function
test_set_asset_stores_uri_and_reloads_settings
( gstfb: _GstFixtures, )
tests/test_media_player.py:580
Function
test_set_board_subtype_propagates_redis_failures
Current contract: ``set_board_subtype`` propagates exceptions from ``rdb.set``. host_agent is a systemd unit with restart-on- failure, so a tr
tests/test_host_agent_board_subtype.py:173
Function
test_set_board_subtype_writes_empty_string_on_unknown
Distinguishes "ran but didn't recognise" (empty string) from "never ran" (key missing). The server-side reader treats both identically, but th
tests/test_host_agent_board_subtype.py:158
Function
test_set_board_subtype_writes_resolved_value
When a known SBC is detected, the resolved key is the payload written to ``host:board_subtype``.
tests/test_host_agent_board_subtype.py:146
Function
test_set_browser_bus_injects_module_state
()
tests/test_media_player.py:257
Function
test_set_display_power_caps_long_error_message
libcec can spew kilobytes of diagnostic output; the toast / API body must not carry an unbounded blob.
tests/test_diagnostics.py:237
Function
test_set_display_power_caps_long_error_sentinel_reason
The ERROR: sentinel branch must apply the same length cap + last-line trim as the unexpected-stdout fallback; a hostile or chatty libcec build
tests/test_diagnostics.py:253
← previous
next →
1,501–1,600 of 1,832, ranked by callers