mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Pass --token to now alias, refs #459
This commit is contained in:
parent
09ef305c68
commit
05cabaebd9
2 changed files with 37 additions and 7 deletions
|
|
@ -63,12 +63,40 @@ def test_publish_now_multiple_aliases(mock_run, mock_which):
|
|||
open("test.db", "w").write("data")
|
||||
runner.invoke(
|
||||
cli.cli,
|
||||
["publish", "now", "test.db", "--alias", "alias1", "--alias", "alias2"],
|
||||
[
|
||||
"publish",
|
||||
"now",
|
||||
"test.db",
|
||||
"--token",
|
||||
"XXX",
|
||||
"--alias",
|
||||
"alias1",
|
||||
"--alias",
|
||||
"alias2",
|
||||
],
|
||||
)
|
||||
mock_run.assert_has_calls(
|
||||
[
|
||||
mock.call("now", stdout=subprocess.PIPE),
|
||||
mock.call(["now", "alias", b"https://demo.example.com/", "alias1"]),
|
||||
mock.call(["now", "alias", b"https://demo.example.com/", "alias2"]),
|
||||
mock.call(["now", "--token", "XXX"], stdout=subprocess.PIPE),
|
||||
mock.call(
|
||||
[
|
||||
"now",
|
||||
"alias",
|
||||
b"https://demo.example.com/",
|
||||
"alias1",
|
||||
"--token",
|
||||
"XXX",
|
||||
]
|
||||
),
|
||||
mock.call(
|
||||
[
|
||||
"now",
|
||||
"alias",
|
||||
b"https://demo.example.com/",
|
||||
"alias2",
|
||||
"--token",
|
||||
"XXX",
|
||||
]
|
||||
),
|
||||
]
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue