Jobs are listed in the history output as soon as they enter the
post-processing queue, and a stopped job has its status set to Failed at
the very start of process_job. The duplicate alternative is only released
near the end of it, so waiting for the job to show up in the history as
failed does not guarantee the alternative was already released. The gap
is tiny when running serially, but wide enough to fail the test under the
load of pytest-xdist. Wait for the label to be dropped instead.
Also move the helpers shared by both adding-NZB test classes into a base
class in testhelper, so the clean tests no longer have to import the
other test module to copy its methods.
* Speed up tests with pytest-xdist
* Ignore request failures when the server disappeared
* Fix tests which modify module globals
* Fix lang change leaking
* Fix transaction compilation order breaking tests
* Always load a clean config and fix related tests
* No module globals
* Fix other test classes assigning module level by making calls
* Replace from sabnzbd.cfg import so monkeypatch works
* More global poisoning
* Fix dependant tests which worksteal breaks
* More global vars
* Drop loadscope until more failures are resolved
* Due to how pytest-xdist is implemented, the -s/--capture=no option does not work
* monkeypatch db_path
* Also patch startup_done
* loadscope
Refactor RSS feed processing logic to enhance clarity and ensure correct precedence for resolved options. Renames functions and variables for better understanding, and inlines feed configuration logic. Adds new tests to verify how category, post-processing, script, and priority settings are applied hierarchically. Also provides a default display for empty RSS log categories.
The side effect of this change is also that if you have an nzb-backup dir with the file already present that this second will be found duplicate, even before the first job has finished in the queue. Relates to #727
* add tests for adding nzbs
* restore clean_cache_dir fixture, unbreak utils tests
* include tests for partial and malformed nzbs
* test handling of prio from nzb metadata category
* update params of test_adding_nzbs_malformed
* add metadata to sabnews nzb creator
* also test with size_limit
* test prio with dupe detection
* remove leftover todo entry
* move pause and cleanup to fixture; rename functions