Skip to content

Commit 616b1da

Browse files
committed
chore/update-click-8.0
1 parent c4bbdb0 commit 616b1da

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

docs/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
click==7.1.2
1+
click==8.0.0
22
sphinx-click==2.5.0

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
python_requires=">=3.6.2, <4",
3333
install_requires=[
3434
"chardet",
35-
"click>=7.1.1, <8",
35+
"click>=8.0.0, <8.1.0",
3636
"click_plugins>=1.1.1",
3737
"colorama>=0.4.3",
3838
"keyring==18.0.1",

tests/cmds/test_departing_employee.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ def test_remove_bulk_users_uses_expected_arguments_when_flat_file(
353353
def test_add_departing_employee_when_invalid_date_validation_raises_error(
354354
runner, cli_state_with_user
355355
):
356+
# day is out of range for month
356357
departure_date = "2020-02-30"
357358
result = runner.invoke(
358359
cli,
@@ -367,7 +368,8 @@ def test_add_departing_employee_when_invalid_date_validation_raises_error(
367368
)
368369
assert result.exit_code == 2
369370
assert (
370-
"Invalid value for '--departure-date': invalid datetime format" in result.output
371+
"Invalid value for '--departure-date': '2020-02-30' does not match the format '%Y-%m-%d'"
372+
in result.output # invalid datetime format
371373
)
372374

373375

@@ -388,7 +390,8 @@ def test_add_departing_employee_when_invalid_date_format_validation_raises_error
388390
)
389391
assert result.exit_code == 2
390392
assert (
391-
"Invalid value for '--departure-date': invalid datetime format" in result.output
393+
"Invalid value for '--departure-date': '2020-30-01' does not match the format '%Y-%m-%d'"
394+
in result.output
392395
)
393396

394397

tests/cmds/test_securitydata.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,10 @@ def test_search_and_send_to_when_advanced_query_passed_non_existent_filename_rai
326326
cli, [*command, "--advanced-query", "@not_a_file"], obj=cli_state
327327
)
328328
assert result.exit_code == 2
329-
assert "Could not open file: not_a_file" in result.stdout
329+
assert (
330+
" Invalid value for '--advanced-query': 'not_a_file': No such file or directory"
331+
in result.stdout
332+
)
330333

331334

332335
@search_and_send_to_test
@@ -724,7 +727,7 @@ def test_search_and_send_to_when_given_invalid_exposure_type_causes_exit(
724727
obj=cli_state,
725728
)
726729
assert result.exit_code == 2
727-
assert "invalid choice: NotValid" in result.output
730+
assert "Invalid value" in result.output
728731

729732

730733
@search_and_send_to_test

tests/cmds/test_trustedactivities.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"""
3939

4040
MISSING_ARGUMENT_ERROR = "Missing argument '{}'."
41-
MISSING_TYPE = MISSING_ARGUMENT_ERROR.format("[DOMAIN|SLACK]")
41+
MISSING_TYPE = MISSING_ARGUMENT_ERROR.format("{DOMAIN|SLACK}")
4242
MISSING_VALUE = MISSING_ARGUMENT_ERROR.format("VALUE")
4343
MISSING_RESOURCE_ID_ARG = MISSING_ARGUMENT_ERROR.format("RESOURCE_ID")
4444
RESOURCE_ID_NOT_FOUND_ERROR = "Resource ID '{}' not found."

0 commit comments

Comments
 (0)