Page MenuHomeSoftware Heritage
Paste P697

date parsing fix
ActivePublic

Authored by anlambert on Jun 12 2020, 4:20 PM.
diff --git a/swh/loader/tests/test_cli.py b/swh/loader/tests/test_cli.py
index bdc0a76..c9968f6 100644
--- a/swh/loader/tests/test_cli.py
+++ b/swh/loader/tests/test_cli.py
@@ -87,7 +87,9 @@ def test_run_with_visit_date(mocker, swh_config):
runner = CliRunner()
input_date = "2016-05-03 15:16:32+00"
- result = runner.invoke(run, ["npm", "https://some-url", f"visit_date={input_date}"])
+ result = runner.invoke(
+ run, ["npm", "https://some-url", f"visit_date='{input_date}'"]
+ )
assert result.exit_code == 0
expected_parsed_date = datetime.datetime(
2016, 5, 3, 15, 16, 32, tzinfo=datetime.timezone.utc