* fix deprecation warning in sabnews regex
* enable text, xml returns from get_api_result
* add api tests
* add functional api tests
* add tavern.yaml files to test data
* explicitly add lxml to work around pip dependency issues
* prevent pytest from picking up the tavern files
* Revert "fix deprecation warning in sabnews regex"
This reverts commit 4f0b7131e7.
* address minor issues
* integrate fixtures into conftest
* black :/
* harden queue repair test
* try a workaround for extremely slow test runs on windoze
* Correct server detection in functional tests
* move scripts dir inside SAB_CACHE_DIR
* also relocate the generated script
Co-authored-by: Safihre <safihre@sabnzbd.org>
SMTP protocol dictates that all lines are supposed to be separated
with CRLF and not LF (even on LF-based systems). This change ensures
that even if the original byte string message is using `\n` for line
separators, the SMTP protocol will still work properly.
This resolves sabnzbd#1669
Fix code formatting
* randomize age for generated nzb files
Useful for testing queue sorting function of the api. Timestamp values are randomly chosen between september '93 and now.
* Sigh.
* only replace the first occurence of "script_"
Use of str.replace() without a count replaces all occurences. As a result, scripts with filenames such as "my_script_for_sab.py" would be mangled when trying to set them as action on queue completion.
* also modify the check of the action var