1
0
Fork 0
mirror of synced 2024-05-19 19:52:41 +12:00

Fix test config

This commit is contained in:
OMEGARAZER 2023-02-26 22:09:29 -05:00
parent a16622e11e
commit c09d945c0d
No known key found for this signature in database
GPG key ID: D89925310D306E35
3 changed files with 7 additions and 5 deletions

View file

@ -1,5 +1,5 @@
if (-not ([string]::IsNullOrEmpty($env:REDDIT_TOKEN)))
{
Copy-Item .\\bdfr\\default_config.cfg .\\test_config.cfg
Write-Output "`nuser_token = $env:REDDIT_TOKEN" >> ./test_config.cfg
Copy-Item .\\bdfr\\default_config.cfg .\\tests\\test_config.cfg
Write-Output "`nuser_token = $env:REDDIT_TOKEN" >> ./tests/test_config.cfg
}

View file

@ -2,6 +2,6 @@
if [ -n "$REDDIT_TOKEN" ]
then
cp ./bdfr/default_config.cfg ./test_config.cfg
echo -e "\nuser_token = $REDDIT_TOKEN" >> ./test_config.cfg
fi
cp ./bdfr/default_config.cfg ./tests/test_config.cfg
echo -e "\nuser_token = $REDDIT_TOKEN" >> ./tests/test_config.cfg
fi

View file

@ -2,6 +2,7 @@
import shutil
from pathlib import Path
from sys import platform
from unittest.mock import MagicMock, patch
import prawcore
@ -425,6 +426,7 @@ def test_cli_download_user_reddit_server_error(test_args: list[str], response: i
@pytest.mark.online
@pytest.mark.reddit
@pytest.mark.skipif(not does_test_config_exist, reason="A test config file is required for integration tests")
@pytest.mark.skipif(platform == "darwin", reason="Test hangs on macos github")
@pytest.mark.parametrize(
"test_args",
(