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_assets_bulk_action_disable
( client: Client, bulk_assets: list[Asset] )
tests/test_template_views.py:1082
Function
test_assets_bulk_action_empty_ids_is_noop
( client: Client, bulk_assets: list[Asset] )
tests/test_template_views.py:1162
Function
test_assets_bulk_action_enable_already_enabled_reports_match_count
Re-enabling already-enabled assets must report the matched count, not 0 — the count comes from a matched-rows count(), not update()'s changed-
tests/test_template_views.py:1203
Function
test_assets_bulk_action_enable_only_selected
Only the ids in the POST flip — an unselected row is untouched.
tests/test_template_views.py:1103
Function
test_assets_bulk_action_invalid_action_is_noop
( client: Client, bulk_assets: list[Asset] )
tests/test_template_views.py:1143
Function
test_assets_bulk_action_no_matching_ids_keeps_selection
Stale ids that match nothing return an info toast (not a silent no-toast 2xx) so the client's success gate keeps the selection.
tests/test_template_views.py:1235
Function
test_assets_bulk_action_trims_whitespace_in_ids
A hand-built ``"a, b"`` CSV (spaces after commas) must still match every row — _bulk_ids strips each segment (Copilot review of #3048).
tests/test_template_views.py:1178
Function
test_assets_bulk_update_blank_duration_does_not_clobber
apply_duration on with a blank duration must NOT zero out every asset — it toasts and changes nothing (Copilot review of #3048).
tests/test_template_views.py:1337
Function
test_assets_bulk_update_clears_time_window
apply_time on with both fields empty removes the window.
tests/test_template_views.py:1502
Function
test_assets_bulk_update_dates
( client: Client, bulk_assets: list[Asset] )
tests/test_template_views.py:1282
Function
test_assets_bulk_update_days
( client: Client, bulk_assets: list[Asset] )
tests/test_template_views.py:1553
Function
test_assets_bulk_update_duration_only_count_excludes_videos
A duration-only edit on a mixed selection (2 webpages + 1 video) skips the video, so the success toast must report 2 updated, not 3 (Copilot r
tests/test_template_views.py:1362
Function
test_assets_bulk_update_duration_skips_video
Duration is applied to images/webpages but never videos — the video's duration is owned by the probe task (mirrors assets_update).
tests/test_template_views.py:1309
Function
test_assets_bulk_update_invalid_date_toasts_and_keeps_values
( client: Client, bulk_assets: list[Asset] )
tests/test_template_views.py:1596
Function
test_assets_bulk_update_issues_single_update_query
Bulk update must write the whole selection in one UPDATE, not one per row (Copilot review of #3048) — proven by counting UPDATE statements aga
tests/test_template_views.py:1425
Function
test_assets_bulk_update_never_writes_video_duration
The duration update must exclude video rows at the SQL level so it can't race with / clobber the probe_video_duration task. Set the video's st
tests/test_template_views.py:1389
Function
test_assets_bulk_update_no_flags_is_noop
( client: Client, bulk_assets: list[Asset] )
tests/test_template_views.py:1574
Function
test_assets_bulk_update_partial_time_window_toasts
Only one endpoint set — reject and leave everything untouched.
tests/test_template_views.py:1530
Function
test_assets_bulk_update_time_window
( client: Client, bulk_assets: list[Asset] )
tests/test_template_views.py:1479
Function
test_assets_bulk_update_unmatched_ids_keeps_selection
bulk_update with non-empty but unmatched ids returns an info toast (not a silent no-toast 2xx) so the client keeps the selection and the modal
tests/test_template_views.py:1256
Function
test_assets_control
( send_to_viewer_mock: Any, command: str, api_client: APIClient, cleanup_asset_dir: None, )
src/anthias_server/api/tests/test_v1_endpoints.py:118
Function
test_assets_control_dispatches
Regression for #2821: the form-post view must publish the same bare ``next``/``previous`` token the viewer's command dispatch table keys on (s
tests/test_template_views.py:490
Function
test_assets_create_rejects_invalid_url
(client: Client)
tests/test_template_views.py:244
Function
test_assets_create_rejects_rtmp
RTMP is well-formed but Qt6's QMediaPlayer can't open it, so the Add modal must reject rtmp:// rather than create an asset that renders black.
tests/test_template_views.py:320
Function
test_assets_create_routes_hls_manifest_to_streaming
An HTTP-delivered HLS manifest (.m3u8) is a live stream, not a downloadable file or a web page — it must classify as streaming.
tests/test_template_views.py:334
Function
test_assets_create_routes_rtsp_to_streaming
Pasting an RTSP URL into the Add modal must classify it as mimetype='streaming' (not 'webpage'), otherwise the viewer hands it to QtWebEngine
tests/test_template_views.py:293
Function
test_assets_create_routes_youtube_to_celery
Pasting a YouTube URL into the Add modal must NOT classify it as a webpage (the iframe embed is blocked by YouTube). The row is created as is_
tests/test_template_views.py:255
Function
test_assets_create_via_post
(client: Client)
tests/test_template_views.py:226
Function
test_assets_create_youtube_short_form
youtu.be short URLs are recognised the same as full URLs.
tests/test_template_views.py:354
Function
test_assets_delete_removes_local_file
Regression for GH #2908: deleting an uploaded asset from the UI form-post route must also remove the binary on disk. Before the fix, ``assets_
tests/test_template_views.py:401
Function
test_assets_delete_removes_row
(client: Client, asset: Asset)
tests/test_template_views.py:389
Function
test_assets_download_404_for_unknown_id
(client: Client)
tests/test_template_views.py:1700
Function
test_assets_download_redirects_for_url_mimetype
( client: Client, asset: Asset )
tests/test_template_views.py:508
Function
test_assets_order_persists_play_order
(client: Client)
tests/test_template_views.py:457
Function
test_assets_preview_404_for_unknown_id
(client: Client)
tests/test_template_views.py:1722
Function
test_assets_preview_redirects_for_url_mimetype
( client: Client, asset: Asset )
tests/test_template_views.py:1710
Function
test_assets_toggle_flips_is_enabled
(client: Client, asset: Asset)
tests/test_template_views.py:375
Function
test_assets_update_clamps_oversize_refresh_interval
The form-level handler clamps (rather than 400s) for friendlier UX — the strict validation lives on the v2 API. 86400 (24h) is the cap shared
tests/test_template_views.py:791
Function
test_assets_update_clears_play_window_when_both_empty
Both endpoints cleared = deliberate "play all day" reset.
tests/test_template_views.py:934
Function
test_assets_update_clears_refresh_interval_on_empty_input
An empty ``refresh_interval_s`` from the edit form means the operator cleared the field, which the AC for #2813 specifies must disable auto-re
tests/test_template_views.py:760
Function
test_assets_update_invalid_play_time_toasts_instead_of_500
allowInput lets the operator type anything into the time fields — junk must come back as an error toast, never a 500, and must not half-save t
tests/test_template_views.py:864
Function
test_assets_update_invalid_start_date_toasts_instead_of_500
( client: Client, asset: Asset )
tests/test_template_views.py:1000
Function
test_assets_update_missing_id_is_no_op
(client: Client)
tests/test_template_views.py:1025
Function
test_assets_update_parses_12_hour_start_end_dates
The Start / End availability pickers post 'm/d/Y h:i K' under the default 12-hour clock + mm/dd/yyyy date format.
tests/test_template_views.py:964
Function
test_assets_update_parses_play_time_formats
Regression for issue #2988: every clock format the Play from / Play until pickers can post must parse and persist.
tests/test_template_views.py:832
Function
test_assets_update_partial_play_window_toasts_and_keeps_existing
Only one endpoint set is a validation error (mirrors the v2 API's _validate_time_window) — it must NOT silently wipe an existing window.
tests/test_template_views.py:900
Function
test_assets_update_via_post
(client: Client, asset: Asset)
tests/test_template_views.py:701
Function
test_assets_update_writes_refresh_interval_to_metadata
The webpage auto-refresh field on the edit modal — feature #2813 — POSTs ``refresh_interval_s`` alongside the rest of the form. The handler mu
tests/test_template_views.py:723
Function
test_assets_upload_extensionless_heic_falls_back_to_mime_subtype
The worst-case mimetypes-DB / filename combination: the host doesn't know ``image/heic`` AND the browser sent the file without a usable filena
tests/test_template_views.py:1941
Function
test_assets_upload_heic_classifies_via_content_type_when_mimedb_sparse
Defensive against hosts whose mimetypes DB doesn't carry image/heic. The browser's Content-Type ride-along (or the extension fallback) must st
tests/test_template_views.py:1898
Function
test_assets_upload_heic_marks_processing_and_queues_image_normalize
HEIC / HEIF / TIFF uploads route through the image normalisation task so the viewer only ever has to render formats it already supports. Other
tests/test_template_views.py:1859
Function
test_assets_upload_jpeg_skips_normalization
JPEG / PNG / WebP uploads land ready-to-play — no Celery hop.
tests/test_template_views.py:2049
Function
test_assets_upload_misnamed_heic_uses_browser_content_type
If the operator renames a HEIC to ``photo.jpg`` and uploads, ``mimetypes.guess_type('photo.jpg')`` returns ``image/jpeg`` and the file would o
tests/test_template_views.py:2002
Function
test_assets_upload_rejects_unknown_extension
guess_type returns None/non-image/video — endpoint should bail with the 'Invalid file type' message.
tests/test_template_views.py:1755
Function
test_assets_upload_video_marks_processing_and_queues_normalize
Video uploads return immediately with is_processing=True and enqueue ``normalize_video_asset`` so ffprobe + (potential) transcode don't block
tests/test_template_views.py:1817
Function
test_astream_backup_response_streams_under_asgi
( backup_home: str, )
tests/test_backup_helper.py:129
Function
test_astream_backup_stops_producer_when_consumer_disconnects
( backup_home: str, )
tests/test_backup_helper.py:172
Function
test_auth_disabled_ignores_drf_authenticators
When ``settings['auth_backend'] == ''`` (auth disabled), the documented contract is "API is fully open". DRF's stock auth classes would violat
tests/test_auth.py:831
Function
test_authorized_calls_view_when_authenticated
(monkeypatch: Any)
tests/test_auth.py:143
Function
test_authorized_drops_next_for_htmx_partial
Dashboard polls htmx fragments every 5s; if the session expires mid-poll we'd otherwise serialize the partial URL into next, dumping the opera
tests/test_auth.py:180
Function
test_authorized_drops_next_for_unsafe_methods
A POST/PUT/PATCH/DELETE that 401s would otherwise produce a ?next=/some/write/endpoint that the post-login GET redirect bounces back to → 405.
tests/test_auth.py:157
Function
test_authorized_finds_request_among_positional_args
A view with extra positional args (e.g. URL captures passed positionally, or a DRF method with ``self`` plus a path parameter) must still reso
tests/test_auth.py:227
Function
test_authorized_no_args_raises
(monkeypatch: Any)
tests/test_auth.py:201
Function
test_authorized_non_request_arg_raises
Calls with positional args that don't include a Request object raise — the decorator can't know which side to redirect.
tests/test_auth.py:213
Function
test_authorized_passthrough_when_auth_backend_disabled
settings['auth_backend'] == '' is the NoAuth equivalent — the wrapped view runs unconditionally so devices on the default un-authenticated con
tests/test_auth.py:104
Function
test_authorized_redirects_when_unauthenticated
When auth is enabled and request.user is anonymous, the decorator should bounce the caller to /login with ?next= filled in.
tests/test_auth.py:121
Function
test_back_to_back_calls_only_enqueue_once
End-to-end: two endpoint hits within the debounce window result in exactly one enqueue. This is the failure mode that a timestamp-based check
tests/test_recheck_endpoint.py:108
Function
test_backup_archive_name_falls_back_on_empty_name
()
tests/test_backup_helper.py:68
Function
test_bad_token_still_rejected
()
tests/test_csrf.py:156
Method
test_bare_calver_without_env
( self, monkeypatch: pytest.MonkeyPatch )
tests/test_sentry.py:224
Function
test_basic_auth_deprecation_log_throttled
The DEPRECATED Basic-auth log must fire at most once per (user, client_ip, path) within the throttle window — a polling Anthias-CLI hitting th
tests/test_auth.py:777
Function
test_basic_auth_header_authenticates_for_back_compat
Pre-2826 callers that send Authorization: Basic must keep working; we deliberately retained DRF's BasicAuthentication. Pin the explicit succe
tests/test_auth.py:732
Function
test_basic_auth_header_rejects_wrong_password
Wrong Basic-auth credentials must produce a deterministic 401 with a WWW-Authenticate challenge — not a 302 (which would indicate ``@authorize
tests/test_auth.py:758
Function
test_blank_and_unblank_commands_registered
()
tests/test_viewer.py:2259
Function
test_blank_display_pauses_without_wlr_on_eglfs
On eglfs the screen blanks by the loop painting BLACK_SCREEN, so blank_display() flips the state but must not invoke wlr-randr.
tests/test_viewer.py:2216
Function
test_blank_display_powers_off_and_pauses_on_wayland
( restore_blank_state: None, )
tests/test_viewer.py:2196
Method
test_blank_name_falls_back_to_disk_filename
(self)
src/anthias_server/api/tests/test_screenly_migration.py:85
Function
test_bootstrap_is_not_in_package_dependencies
package.json must not reintroduce bootstrap — the SCSS layer no longer relies on it (every component lives under `.app-*`), and pulling Bootst
tests/test_template_views.py:2427
Method
test_bounded_when_socket_never_appears
( self, monkeypatch: pytest.MonkeyPatch, tmp_path: Any )
tests/test_viewer.py:2078
Function
test_broken_settings_should_raise_value_error
(settings_env: None)
tests/test_settings.py:145
Function
test_build_command_passes_rotation
(gstfb: _GstFixtures)
tests/test_media_player.py:647
Function
test_build_command_passes_through_scheme_uris
( gstfb: _GstFixtures, )
tests/test_media_player.py:624
Function
test_build_command_quotes_spaces_in_bare_path
( gstfb: _GstFixtures, )
tests/test_media_player.py:639
Function
test_build_command_spawns_looping_player_module
( gstfb: _GstFixtures, )
tests/test_media_player.py:592
Function
test_build_command_wraps_bare_path_as_file_uri
( gstfb: _GstFixtures, )
tests/test_media_player.py:613
Function
test_build_fit_caps_pins_par
()
tests/test_gst_fbdev_player.py:67
Function
test_build_fit_caps_without_dims_only_pins_format_and_par
()
tests/test_gst_fbdev_player.py:77
Function
test_build_imager_json_emits_one_entry_per_supported_board
( mock_full_build: MagicMock, )
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:317
Function
test_build_imager_json_excludes_pi1
(mock_full_build: MagicMock)
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:335
Function
test_build_imager_json_round_trips_through_json
( mock_full_build: MagicMock, )
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:327
Function
test_build_imager_json_tags_every_entry_for_its_board
( mock_full_build: MagicMock, )
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:341
Function
test_build_webview_env_appends_rotation_on_linuxfb
Pi boards (linuxfb) get the rotation baked into QT_QPA_PLATFORM so the Qt plugin rotates the framebuffer for free.
tests/test_viewer.py:1292
Function
test_build_webview_env_drops_dark_mode_flag_when_disabled
()
tests/test_viewer.py:1099
Function
test_build_webview_env_eglfs_clears_stale_rotation
Dialling back to 0° after a rotated launch must drop a stale QT_QPA_EGLFS_ROTATION so the respawned webview un-rotates.
tests/test_viewer.py:1447
Function
test_build_webview_env_eglfs_zero_omits_rotation
Default orientation must not set QT_QPA_EGLFS_ROTATION at all.
tests/test_viewer.py:1430
Function
test_build_webview_env_no_op_on_pi5_wayland
Issue #3044: on Pi 5 the rotation must NOT be appended as a ``:rotation=N`` option — the Qt wayland plugin ignores it (that's a linuxfb-only o
tests/test_viewer.py:1237
Function
test_build_webview_env_no_op_on_wayland
x86 runs Qt wayland under cage; rotation goes through wlr-randr, NOT through the QPA plugin which has no rotation= option.
tests/test_viewer.py:1325
Function
test_build_webview_env_no_suffix_at_zero_rotation
Default-orientation displays should stay on the existing QT_QPA_PLATFORM string so we don't change behavior for the 99% case who never touches
tests/test_viewer.py:1340
Function
test_build_webview_env_overwrites_stale_ua_token
()
tests/test_viewer.py:1134
Function
test_build_webview_env_preserves_other_qpa_options
An operator who set QT_QPA_PLATFORM=linuxfb:fb=/dev/fb1 must keep that option through a rotation change — Copilot review of #2882 flagged that
tests/test_viewer.py:1356
← previous
next →
901–1,000 of 1,832, ranked by callers