MCPcopy Create free account
hub / github.com/httpie/cli / test_config_file_inaccessible

Function test_config_file_inaccessible

tests/test_config.py:37–47  ·  view source on GitHub ↗
(httpbin)

Source from the content-addressed store, hash-verified

35
36@pytest.mark.skipif(is_windows, reason='cannot chmod 000 on Windows')
37def test_config_file_inaccessible(httpbin):
38 env = MockEnvironment()
39 env.create_temp_config_dir()
40 config_path = env.config_dir / Config.FILENAME
41 assert not config_path.exists()
42 config_path.touch(0o000)
43 assert config_path.exists()
44 r = http(httpbin + '/get', env=env)
45 assert HTTP_OK in r
46 assert 'http: warning' in r.stderr
47 assert 'cannot read config file' in r.stderr
48
49
50def test_default_options_overwrite(httpbin):

Callers

nothing calls this directly

Calls 4

MockEnvironmentClass · 0.85
httpFunction · 0.85
existsMethod · 0.80

Tested by

no test coverage detected