mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-15 05:20:20 -06:00
Fix missing create=True attribute in docker tests
This commit is contained in:
@@ -18,12 +18,12 @@ def test_docker_is_running_process_error():
|
||||
def test_docker_fallback_uid():
|
||||
def invalid_attribute():
|
||||
raise AttributeError
|
||||
with mock.patch('os.getuid', invalid_attribute):
|
||||
with mock.patch('os.getuid', invalid_attribute, create=True):
|
||||
assert docker.getuid() == docker.FALLBACK_UID
|
||||
|
||||
|
||||
def test_docker_fallback_gid():
|
||||
def invalid_attribute():
|
||||
raise AttributeError
|
||||
with mock.patch('os.getgid', invalid_attribute):
|
||||
with mock.patch('os.getgid', invalid_attribute, create=True):
|
||||
assert docker.getgid() == docker.FALLBACK_GID
|
||||
|
||||
Reference in New Issue
Block a user