MCPcopy Create free account

hub / github.com/Screenly/Anthias / functions

Functions1,832 in github.com/Screenly/Anthias

Methodtest_no_zoneinfo_root_skips_disk_check
(self, tmp_path: Path)
tests/test_django_timezone.py:84
Methodtest_non_database_errors_fail_fast
(self)
tests/test_celery_tasks.py:1973
Methodtest_none_when_version_unknown
( self, monkeypatch: pytest.MonkeyPatch )
tests/test_sentry.py:235
Functiontest_normalize_image_asset_celery_no_op_when_row_finalized
The celery task body must short-circuit on a row that's already cleared is_processing — duplicate dispatch can't re-convert and stomp on opera
tests/test_processing.py:1652
Functiontest_normalize_image_asset_celery_no_op_when_row_missing
()
tests/test_processing.py:1693
Functiontest_normalize_on_failure_clears_stale_error_recipe_and_handbrake
A subsequent non-recipe failure must clear any stale ``error_recipe`` / ``error_handbrake`` from a previous run, otherwise the modal would sho
tests/test_processing.py:1866
Functiontest_normalize_on_failure_no_args_is_safe
on_failure called with empty args (e.g. a queueing crash before the task body ran) must not raise.
tests/test_processing.py:1813
Functiontest_normalize_on_failure_unsupported_codec_persists_recipe
``UnsupportedVideoCodecError`` is the gate's user-facing exception. on_failure must: * write the bare message into ``metadata.error_message``
tests/test_processing.py:1822
Functiontest_normalize_on_failure_writes_error_metadata
The custom Task.on_failure path must persist the error message and clear is_processing — operator must never see a row stuck forever in 'Proce
tests/test_processing.py:1777
Functiontest_normalize_tasks_exclude_permanent_oserrors_from_autoretry
Both normalisation tasks have ``autoretry_for=(OSError,)`` so a transient disk hiccup is retried automatically. Several OSError subclasses are
tests/test_processing.py:1701
Functiontest_normalize_video_asset_celery_no_op_when_row_finalized
( asset_dir: str, )
tests/test_processing.py:1674
Methodtest_not_ready_when_db_is_locked
(self)
tests/test_celery_tasks.py:1960
Methodtest_not_ready_with_unapplied_migrations
(self)
tests/test_celery_tasks.py:1951
Functiontest_notify_browser_only_skips_viewer_reload
Intermediate hops that leave is_processing=True (e.g. the YouTube task before chaining into normalize_video) call ``_notify(..., reload_viewer
tests/test_processing.py:2101
Functiontest_notify_swallows_notify_errors
()
tests/test_processing.py:2083
Functiontest_notify_swallows_publish_errors
Redis flake during the viewer reload publish must not block the browser-side notify (or vice-versa). Both are best-effort.
tests/test_processing.py:2066
Functiontest_operator_username_empty_when_no_user_exists
()
tests/test_auth.py:255
Functiontest_operator_username_returns_first_superuser
()
tests/test_auth.py:299
Functiontest_orphan_file_is_removed
No Asset row references it and it's older than the 1h guard.
tests/test_celery_tasks.py:97
Methodtest_other_failures_still_log_error
( self, caplog: pytest.LogCaptureFixture )
tests/test_viewer.py:1966
Functiontest_overnight_window_active_before_and_after_midnight
()
tests/test_scheduler.py:314
Functiontest_page_context_assets_split
(asset: Asset)
tests/test_template_views.py:163
Functiontest_page_context_device_settings_keys
()
tests/test_template_views.py:173
Functiontest_page_context_integrations_when_off_balena
()
tests/test_template_views.py:197
Functiontest_page_context_navbar_has_balena_and_up_to_date
()
tests/test_template_views.py:190
Functiontest_parse_args_rejects_non_cardinal_rotation
()
tests/test_gst_fbdev_player.py:123
Functiontest_parse_cpu_info_extracts_fields
()
tests/test_device_helper.py:28
Functiontest_parse_cpu_info_minimal
()
tests/test_device_helper.py:39
Functiontest_parse_settings
(settings_env: None)
tests/test_settings.py:107
Functiontest_parse_version_calver_ordering_is_numeric
Catches the bug from the issue: string compare would put 10 before 5; packaging.version must compare numerically.
tests/test_github.py:176
Functiontest_parse_version_invalid_returns_none
()
tests/test_github.py:171
Functiontest_parse_version_strips_leading_v
()
tests/test_github.py:164
Functiontest_passes_timeout
(mock_post: Any, telemetry_env: None)
tests/test_telemetry.py:104
Functiontest_patch_device_settings_default_assets
( remove_default_assets_mock: Any, add_default_assets_mock: Any, publisher_mock: Any, settings
src/anthias_server/api/tests/test_v2_endpoints.py:320
Functiontest_patch_device_settings_invalid_auth_backend
( settings_mock: Any, api_client: APIClient, device_settings_url: str )
src/anthias_server/api/tests/test_v2_endpoints.py:80
Functiontest_patch_device_settings_password_mismatch_is_not_logged_as_error
A mismatched-password PATCH is operator input validation, not a server bug. It must return 400 with the operator-friendly message AND be logge
src/anthias_server/api/tests/test_v2_endpoints.py:619
Functiontest_patch_device_settings_rotation_rejects_non_cardinal
45 isn't one of the four supported angles — serializer must 400 rather than passing it through to the viewer (where neither the Qt linuxfb plu
src/anthias_server/api/tests/test_v2_endpoints.py:442
Functiontest_patch_device_settings_screen_rotation
( publisher_mock: Any, settings_mock: Any, api_client: APIClient, device_settings_url: str, )
src/anthias_server/api/tests/test_v2_endpoints.py:414
Functiontest_patch_device_settings_success
( publisher_mock: Any, settings_mock: Any, api_client: APIClient, device_settings_url: str, )
src/anthias_server/api/tests/test_v2_endpoints.py:116
Functiontest_patch_device_settings_validation_error
( settings_mock: Any, api_client: APIClient, device_settings_url: str )
src/anthias_server/api/tests/test_v2_endpoints.py:167
Methodtest_path_traversal_chars_are_sanitised
(self)
src/anthias_server/api/tests/test_screenly_migration.py:103
Functiontest_pi3_64_hw_decode_set_is_h264_only
The 64-bit Qt6 Pi 3 board (``pi3-64``) runs the same VideoCore IV silicon as the 32-bit ``pi3`` — H.264-only HW decode, no HEVC. The gate must
tests/test_processing.py:846
Functiontest_play_bus_failure_clears_playing_state
(mpv: _MPVFixtures)
tests/test_media_player.py:168
Functiontest_play_calls_browser_bus_with_expected_options_on_pi4_64
( _mock_detect: Any, mpv: _MPVFixtures )
tests/test_media_player.py:100
Methodtest_play_clears_state_when_wrapper_reraises
( self, mpv: _MPVFixtures )
tests/test_media_player.py:1073
Functiontest_play_days_restricts_weekday
()
tests/test_scheduler.py:288
Functiontest_play_no_bus_logs_and_clears_state
(mpv: _MPVFixtures)
tests/test_media_player.py:158
Functiontest_play_omits_libmpv_era_options
(mpv: _MPVFixtures)
tests/test_media_player.py:112
Functiontest_play_order_change_propagates_when_shuffle_off
With shuffle off, an admin reordering assets via play_order should take effect on the next refresh — the membership-equality fast path is shuf
tests/test_scheduler.py:463
Methodtest_play_recovers_when_wrapper_respawns
( self, mpv: _MPVFixtures )
tests/test_media_player.py:1044
Functiontest_play_reloads_settings_each_call
(mpv: _MPVFixtures)
tests/test_media_player.py:152
Functiontest_play_spawns_player_and_is_playing
(gstfb: _GstFixtures)
tests/test_media_player.py:656
Functiontest_play_time_window_restricts_hour
()
tests/test_scheduler.py:298
Functiontest_play_unblanks_when_display_blanked
play on a blanked display implies unblank: power back on, clear the blank, resume — never leave display_blanked set.
tests/test_viewer.py:2274
Functiontest_play_uses_default_alsa_device_on_arm64
(mpv: _MPVFixtures)
tests/test_media_player.py:128
Methodtest_play_uses_injected_wrapper
(self, mpv: _MPVFixtures)
tests/test_media_player.py:1014
Functiontest_play_uses_local_audio_device_when_configured
( mpv: _MPVFixtures, )
tests/test_media_player.py:141
Functiontest_playlist_deadline_caps_when_asset_has_time_window
An asset with a play_time window can transition active state without crossing a start/end boundary — the deadline must include a 60s cap so th
tests/test_viewer_api.py:214
Functiontest_playlist_deadline_is_soonest_active_end_date
Two active assets: deadline is the earlier end_date because that's when the first one drops out of the active set.
tests/test_viewer_api.py:162
Functiontest_playlist_deadline_picks_inactive_start_date_when_scheduled
If the soonest future boundary is an *inactive* asset's start_date (not the active one's end_date), deadline must point at it so the viewer re
tests/test_viewer_api.py:183
Functiontest_playlist_empty_when_no_assets
()
tests/test_viewer_api.py:117
Functiontest_playlist_order
( api_client: APIClient, cleanup_asset_dir: None )
src/anthias_server/api/tests/test_v1_endpoints.py:74
Functiontest_playlist_orders_by_play_order_when_not_shuffled
( _restore_shuffle_setting: None, )
tests/test_viewer_api.py:150
Functiontest_playlist_rejects_wrong_token
A malformed / stale token is treated like no token at all — same 403, no timing-leak distinction.
tests/test_viewer_api.py:106
Functiontest_playlist_requires_internal_auth
No token → 403. The endpoint must never serve an unauthenticated request because it discloses asset URIs (which can include credentials inline
tests/test_viewer_api.py:97
Functiontest_playlist_returns_only_active_assets
Active assets are surfaced, an asset whose start_date is in the future is filtered out (Asset.is_active() will return False for it).
tests/test_viewer_api.py:127
Functiontest_playlist_should_be_updated_after_deadline_reached
( restore_shuffle_setting: None, )
tests/test_scheduler.py:241
Functiontest_playlist_shuffles_when_setting_enabled
With shuffle on, asset membership stays the same but order is shuffled. With many assets, repeated requests should produce at least one non-so
tests/test_viewer_api.py:249
Functiontest_preferred_download_vcodec
( device_type: str, expected: str, monkeypatch: pytest.MonkeyPatch, )
tests/test_processing.py:877
Functiontest_prepare_asset_routes_heic_through_image_pipeline
End-to-end-ish: simulate a HEIC upload and verify prepare_asset stamps is_processing=True and stashes the pending flag the view dispatches on.
tests/test_processing.py:2176
Functiontest_prepare_asset_routes_video_through_video_pipeline
( asset_dir: str, )
tests/test_processing.py:2219
Functiontest_prepare_asset_skips_pipeline_for_jpeg_upload
Common JPEG / PNG / WebP uploads land ready-to-play — never enqueue a normalisation task for them.
tests/test_processing.py:2293
Functiontest_prepare_asset_skips_pipeline_for_remote_url
A webpage / RTSP / HTTP video URL must not get flagged for normalisation — only locally-uploaded files do.
tests/test_processing.py:2261
Functiontest_prettify_upload_name
(raw: str, expected: str)
tests/test_template_views.py:1810
Methodtest_pretty_name_gets_disk_extension
(self)
src/anthias_server/api/tests/test_screenly_migration.py:79
Functiontest_preview_modal_opens
(reset_assets: None, page: Page)
tests/test_app.py:953
Functiontest_preview_modal_renders_image_and_done_closes
An image asset previews via /assets/<id>/preview inside the modal; the Done button drops the Alpine state again.
tests/test_app.py:974
Functiontest_probe_video_duration_clears_processing_when_ffprobe_unavailable
ffprobe missing → keep the seeded duration, still clear the processing flag so the row leaves the placeholder state.
tests/test_celery_tasks.py:652
Functiontest_probe_video_duration_no_op_for_unknown_asset
Stale asset_id (deleted between enqueue and run) — task must not crash. Nothing to assert beyond a clean return.
tests/test_celery_tasks.py:677
Functiontest_probe_video_duration_writes_back_real_duration
Happy path: ffprobe returns a length, the row gets it and is flipped out of is_processing.
tests/test_celery_tasks.py:626
Functiontest_product_token_falls_back_to_unknown
()
tests/test_http.py:17
Functiontest_product_token_uses_release
()
tests/test_http.py:10
Methodtest_propagates_network_error
(self, get_mock: MagicMock)
src/anthias_server/api/tests/test_screenly_migration.py:208
Functiontest_proxy_reset_clears_cached_instance
When the operator changes rotation in Settings, the viewer calls MediaPlayerProxy.reset() so the next play() rebuilds VLC with the new transfo
tests/test_media_player.py:966
Methodtest_raises_on_5xx
(self, get_mock: MagicMock)
src/anthias_server/api/tests/test_screenly_migration.py:200
Methodtest_raises_screenly_error_on_create_failure
( self, get_mock: MagicMock, post_mock: MagicMock )
src/anthias_server/api/tests/test_screenly_migration.py:265
Functiontest_read_iface_mac_returns_real_mac
( monkeypatch: pytest.MonkeyPatch, )
tests/test_utils.py:382
Functiontest_read_iface_mac_skips_zero_mac
( monkeypatch: pytest.MonkeyPatch, )
tests/test_utils.py:371
Methodtest_reads_and_strips_nul_terminated_model
( self, tmp_path: Path )
tests/test_sentry.py:189
Methodtest_ready_when_plan_is_empty
(self)
tests/test_celery_tasks.py:1943
Functiontest_reboot
( reboot_anthias_mock: Any, api_client: APIClient, cleanup_asset_dir: None, )
src/anthias_server/api/tests/test_v1_endpoints.py:138
Functiontest_reboot_anthias_publishes_hostcmd_off_balena
()
tests/test_celery_tasks.py:213
Functiontest_reboot_anthias_uses_balena_supervisor_on_balena
()
tests/test_celery_tasks.py:225
Functiontest_reboot_via_balena_supervisor_uses_post
(monkeypatch: Any)
tests/test_utils.py:233
Functiontest_recheck_acquires_lock_when_running
The task must SETNX the cooldown lock before probing — that gate is what prevents concurrent ffprobe calls for the same asset across workers.
tests/test_celery_tasks.py:552
Functiontest_recheck_flips_is_reachable
(eager_celery_recheck: None)
tests/test_celery_tasks.py:524
Functiontest_recheck_lock_prevents_back_to_back_probes
SETNX cooldown gate: if the per-asset lock is already held (someone else just probed within RECHECK_COOLDOWN_S), this task must no-op without
tests/test_celery_tasks.py:534
Functiontest_recheck_no_op_when_asset_does_not_exist
( eager_celery_recheck: None, )
tests/test_celery_tasks.py:514
Functiontest_recheck_runs_when_no_lock_held
No lock held → SETNX succeeds → probe runs.
tests/test_celery_tasks.py:609
Functiontest_recheck_skips_disabled_asset
( eager_celery_recheck: None, )
tests/test_celery_tasks.py:567
← previousnext →1,401–1,500 of 1,832, ranked by callers