Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 22, 2021
1 parent a3ff253 commit 5a57fa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/languages/docker_test.py
Expand Up @@ -19,18 +19,18 @@ def invalid_attribute():


class TestInDocker:
@mock.patch("builtins.open", new_callable=mock_open)
@mock.patch('builtins.open', new_callable=mock_open)
def test_in_docker_no_file(self, mock_file):
mock_file.side_effect = FileNotFoundError

assert docker.is_in_docker() is False
mock_file.assert_called()

@mock.patch("builtins.open", new_callable=mock_open, read_data='tdockert')
@mock.patch('builtins.open', new_callable=mock_open, read_data='tdockert')
def test_in_docker_docker_in_file(self, _):
assert docker.is_in_docker() is True

@mock.patch("builtins.open", new_callable=mock_open, read_data='testtest')
@mock.patch('builtins.open', new_callable=mock_open, read_data='testtest')
def test_in_docker_docker_not_in_file(self, _):
assert docker.is_in_docker() is False

Expand Down

0 comments on commit 5a57fa6

Please sign in to comment.