mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
pytest.mark.serial for any test using isolated_filesystem(), refs #1406
This commit is contained in:
parent
121e10c29c
commit
2b1c535c12
3 changed files with 14 additions and 1 deletions
|
|
@ -1,8 +1,10 @@
|
|||
from click.testing import CliRunner
|
||||
from datasette import cli
|
||||
from unittest import mock
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.serial
|
||||
@mock.patch("shutil.which")
|
||||
def test_publish_heroku_requires_heroku(mock_which):
|
||||
mock_which.return_value = False
|
||||
|
|
@ -15,6 +17,7 @@ def test_publish_heroku_requires_heroku(mock_which):
|
|||
assert "Publishing to Heroku requires heroku" in result.output
|
||||
|
||||
|
||||
@pytest.mark.serial
|
||||
@mock.patch("shutil.which")
|
||||
@mock.patch("datasette.publish.heroku.check_output")
|
||||
@mock.patch("datasette.publish.heroku.call")
|
||||
|
|
@ -44,6 +47,7 @@ def test_publish_heroku_invalid_database(mock_which):
|
|||
assert "Path 'woop.db' does not exist" in result.output
|
||||
|
||||
|
||||
@pytest.mark.serial
|
||||
@mock.patch("shutil.which")
|
||||
@mock.patch("datasette.publish.heroku.check_output")
|
||||
@mock.patch("datasette.publish.heroku.call")
|
||||
|
|
@ -79,6 +83,7 @@ def test_publish_heroku(mock_call, mock_check_output, mock_which):
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.serial
|
||||
@mock.patch("shutil.which")
|
||||
@mock.patch("datasette.publish.heroku.check_output")
|
||||
@mock.patch("datasette.publish.heroku.call")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue