Merge pull request #722 from OMEGARAZER/development
This commit is contained in:
@@ -78,5 +78,4 @@ markers = [
|
|||||||
"reddit: tests require a connection to Reddit",
|
"reddit: tests require a connection to Reddit",
|
||||||
"slow: test is slow to run",
|
"slow: test is slow to run",
|
||||||
"authenticated: test requires an authenticated Reddit instance",
|
"authenticated: test requires an authenticated Reddit instance",
|
||||||
"testing: incomplete tests",
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -184,14 +184,8 @@ def test_cli_archive_soft_fail(test_args: list[str], tmp_path: Path):
|
|||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("test_args", "response"),
|
("test_args", "response"),
|
||||||
(
|
(
|
||||||
(
|
(["--user", "nasa", "--submitted"], 502),
|
||||||
["--user", "nasa", "--submitted"],
|
(["--user", "nasa", "--submitted"], 504),
|
||||||
502,
|
|
||||||
),
|
|
||||||
(
|
|
||||||
["--user", "nasa", "--submitted"],
|
|
||||||
504,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
def test_user_serv_fail(test_args: list[str], response: int, tmp_path: Path):
|
def test_user_serv_fail(test_args: list[str], response: int, tmp_path: Path):
|
||||||
|
|||||||
@@ -76,14 +76,8 @@ def test_cli_scrape_soft_fail(test_args: list[str], tmp_path: Path):
|
|||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("test_args", "response"),
|
("test_args", "response"),
|
||||||
(
|
(
|
||||||
(
|
(["--user", "nasa", "--submitted"], 502),
|
||||||
["--user", "nasa", "--submitted"],
|
(["--user", "nasa", "--submitted"], 504),
|
||||||
502,
|
|
||||||
),
|
|
||||||
(
|
|
||||||
["--user", "nasa", "--submitted"],
|
|
||||||
504,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
def test_user_serv_fail(test_args: list[str], response: int, tmp_path: Path):
|
def test_user_serv_fail(test_args: list[str], response: int, tmp_path: Path):
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ does_test_config_exist = Path("./tests/test_config.cfg").exists()
|
|||||||
|
|
||||||
|
|
||||||
def copy_test_config(run_path: Path):
|
def copy_test_config(run_path: Path):
|
||||||
shutil.copy(Path("./tests/test_config.cfg"), Path(run_path, "./test_config.cfg"))
|
shutil.copy(Path("./tests/test_config.cfg"), Path(run_path, "test_config.cfg"))
|
||||||
|
|
||||||
|
|
||||||
def create_basic_args_for_download_runner(test_args: list[str], run_path: Path):
|
def create_basic_args_for_download_runner(test_args: list[str], run_path: Path):
|
||||||
@@ -25,7 +25,7 @@ def create_basic_args_for_download_runner(test_args: list[str], run_path: Path):
|
|||||||
str(run_path),
|
str(run_path),
|
||||||
"-v",
|
"-v",
|
||||||
"--config",
|
"--config",
|
||||||
str(Path(run_path, "./test_config.cfg")),
|
str(Path(run_path, "test_config.cfg")),
|
||||||
"--log",
|
"--log",
|
||||||
str(Path(run_path, "test_log.txt")),
|
str(Path(run_path, "test_log.txt")),
|
||||||
] + test_args
|
] + test_args
|
||||||
@@ -279,7 +279,7 @@ def test_cli_download_hard_fail(test_args: list[str], tmp_path: Path):
|
|||||||
|
|
||||||
def test_cli_download_use_default_config(tmp_path: Path):
|
def test_cli_download_use_default_config(tmp_path: Path):
|
||||||
runner = CliRunner()
|
runner = CliRunner()
|
||||||
test_args = ["download", "-vv", str(tmp_path)]
|
test_args = ["download", "-vv", str(tmp_path), "--log", str(Path(tmp_path, "test_log.txt"))]
|
||||||
result = runner.invoke(cli, test_args)
|
result = runner.invoke(cli, test_args)
|
||||||
assert result.exit_code == 0
|
assert result.exit_code == 0
|
||||||
|
|
||||||
@@ -404,14 +404,8 @@ def test_cli_download_score_filter(test_args: list[str], was_filtered: bool, tmp
|
|||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("test_args", "response"),
|
("test_args", "response"),
|
||||||
(
|
(
|
||||||
(
|
(["--user", "nasa", "--submitted"], 502),
|
||||||
["--user", "nasa", "--submitted"],
|
(["--user", "nasa", "--submitted"], 504),
|
||||||
502,
|
|
||||||
),
|
|
||||||
(
|
|
||||||
["--user", "nasa", "--submitted"],
|
|
||||||
504,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
def test_user_serv_fail(test_args: list[str], response: int, tmp_path: Path):
|
def test_user_serv_fail(test_args: list[str], response: int, tmp_path: Path):
|
||||||
|
|||||||
Reference in New Issue
Block a user