(httpbin)
| 35 | |
| 36 | @pytest.mark.skipif(is_windows, reason='cannot chmod 000 on Windows') |
| 37 | def 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 | |
| 50 | def test_default_options_overwrite(httpbin): |
nothing calls this directly
no test coverage detected