| 5 | |
| 6 | |
| 7 | async def test_statusbar(console, monkeypatch): |
| 8 | console.options.update( |
| 9 | modify_headers=[":~q:foo:bar"], |
| 10 | modify_body=[":~q:foo:bar"], |
| 11 | ignore_hosts=["example.com", "example.org"], |
| 12 | tcp_hosts=["example.tcp"], |
| 13 | intercept="~q", |
| 14 | view_filter="~dst example.com", |
| 15 | stickycookie="~dst example.com", |
| 16 | stickyauth="~dst example.com", |
| 17 | console_default_contentview="javascript", |
| 18 | anticache=True, |
| 19 | anticomp=True, |
| 20 | showhost=True, |
| 21 | server_replay_refresh=False, |
| 22 | server_replay_extra="kill", |
| 23 | upstream_cert=False, |
| 24 | stream_large_bodies="3m", |
| 25 | mode=["transparent"], |
| 26 | ) |
| 27 | console.options.update(view_order="url", console_focus_follow=True) |
| 28 | monkeypatch.setattr(console.addons.get("clientplayback"), "count", lambda: 42) |
| 29 | monkeypatch.setattr(console.addons.get("serverplayback"), "count", lambda: 42) |
| 30 | monkeypatch.setattr(statusbar.StatusBar, "refresh", lambda x: None) |
| 31 | |
| 32 | bar = statusbar.StatusBar(console) # this already causes a redraw |
| 33 | assert bar.ib._w |
| 34 | |
| 35 | |
| 36 | @pytest.mark.parametrize( |