datasette publish heroku --tar option, closes #969

This commit is contained in:
Simon Willison 2020-10-08 16:30:46 -07:00
commit e4554c37b7
3 changed files with 27 additions and 4 deletions

View file

@ -55,12 +55,22 @@ def test_publish_heroku(mock_call, mock_check_output, mock_which):
runner = CliRunner()
with runner.isolated_filesystem():
open("test.db", "w").write("data")
result = runner.invoke(cli.cli, ["publish", "heroku", "test.db"])
result = runner.invoke(
cli.cli, ["publish", "heroku", "test.db", "--tar", "gtar"]
)
assert 0 == result.exit_code, result.output
mock_call.assert_has_calls(
[
mock.call(
["heroku", "builds:create", "-a", "f", "--include-vcs-ignore"]
[
"heroku",
"builds:create",
"-a",
"f",
"--include-vcs-ignore",
"--tar",
"gtar",
]
),
]
)