wrolpi/wrolpi/test
Roland a7264fd5d7
Tasks don't inherit a declared write; tags import change backed out
From review of #864:

- background_task's task copied its creator's Context, including
  _write_intent when started inside get_db_session(commit=True) or
  RequestDB.write(), so the guard ignored the task's own writes for its
  lifetime.  The task now starts with no declared write.  That exposes
  fetch_channel_source_id (started by the channels config import): it read
  the Channel, asked the remote site for its source_id, then committed in
  the same deferred transaction.  It now reads, fetches with no
  transaction open, then writes in a short get_db_session(commit=True).
- tags.import_config: commit=True held the write lock through its directory
  walk, and its exit commit saved changes the need_commit gate used to
  drop.  Reverted to master; splitting its reads from a short write is its
  own change.  The two tests that run it through a request are marked
  allow_deferred_request_writes until then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:37:42 -06:00
..
fixtures/configs Add Docs module for searching and organizing PDFs and EPUBs 2026-03-20 14:17:06 -06:00
__init__.py A new start 2021-11-01 16:43:09 -06:00
common.py Rename skip_circleci to skip_ci (#797) 2026-10-08 17:28:13 -06:00
test_api_fixtures.py db: request-path library functions use the request's connection (#774) 2026-10-04 11:05:20 -06:00
test_api_utils.py api: run the perpetual loops in one Sanic-managed process (#718) 2026-09-23 07:53:53 -06:00
test_bookmarks.py Add a Repos module that mirrors git repositories (#783) 2026-10-07 15:16:58 -06:00
test_captions.py videos: center YouTube auto-captions at download time 2026-07-16 18:51:36 -06:00
test_cmd.py which() prefers the executable found in $PATH (#852) 2026-10-21 16:49:41 -06:00
test_common.py Rename skip_circleci to skip_ci (#797) 2026-10-08 17:28:13 -06:00
test_config_api.py Tasks don't inherit a declared write; tags import change backed out 2026-10-23 15:37:42 -06:00
test_config_backup_import.py Tasks don't inherit a declared write; tags import change backed out 2026-10-23 15:37:42 -06:00
test_config_partial_import.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
test_contexts.py Reformatting code. 2025-12-06 15:11:37 -07:00
test_cross_config_disaster_recovery.py Track how far the user is through a file, kept in recently_viewed.yaml (#787) 2026-10-08 16:15:25 -06:00
test_dates.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
test_db.py Tasks don't inherit a declared write; tags import change backed out 2026-10-23 15:37:42 -06:00
test_db_bootstrap.py A library on the internal disk gets a database (#832) 2026-10-14 16:15:33 -06:00
test_db_query.py Database schema lists each column's foreign key (#822) 2026-10-11 19:38:39 -06:00
test_downloader.py db: request-path library functions use the request's connection (#774) 2026-10-04 11:05:20 -06:00
test_downloads_config.py tests: fix the midnight and event-loop timing flakes (#779) 2026-10-04 18:43:00 -06:00
test_events.py Rename skip_circleci to skip_ci (#797) 2026-10-08 17:28:13 -06:00
test_extensions.py Creating browser extension to facilitate starting downloads. Chrome/Brave and Firefox supported. 2026-05-03 11:48:50 -06:00
test_flags.py A library on the internal disk gets a database (#832) 2026-10-14 16:15:33 -06:00
test_fts.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
test_jobs.py Jobs queue, video Edit dropdown: transcode/remux, edit title & description (#711) 2026-09-16 19:25:23 -06:00
test_json_encoder.py API JSON: encode paths without a lookup per path (#810) 2026-10-09 19:45:43 -06:00
test_model_repr.py Model reprs read only loaded state (#819) 2026-10-11 16:47:32 -06:00
test_perpetual.py api: forked workers die on SIGTERM before Sanic installs their handlers (#743) 2026-10-02 15:49:06 -06:00
test_request_db.py db: request-path library functions use the request's connection (#774) 2026-10-04 11:05:20 -06:00
test_root_api.py Download and tag requests wait for a concurrent writer (#848) 2026-10-21 16:48:16 -06:00
test_rss.py Using stubs to simplify tests. 2026-05-07 20:07:46 -06:00
test_serializers.py db: serializers read only loaded data (#777) 2026-10-04 18:28:08 -06:00
test_speedtest.py Speed Test calculator: ping, download, and upload against the API (#708) 2026-09-13 18:47:18 -06:00
test_switches.py Fix API stalls: non-blocking switch worker, threaded searches, indexed Videos page (#678) 2026-08-29 16:17:53 -06:00
test_tags.py Remove a file's Tags Directory links when WROLPi deletes it (#861) 2026-10-23 14:40:57 -06:00
test_trust_store.py Distrust compromised eMudhra intermediates in certifi and Deno (#854) 2026-10-23 08:54:57 -06:00
test_upgrade.py api: run the perpetual loops in one Sanic-managed process (#718) 2026-09-23 07:53:53 -06:00