mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
Added a new test to test that the issue from the previous commit won't
happen anymore
This commit is contained in:
parent
af7088d7f3
commit
f2b118817e
@ -1,6 +1,6 @@
|
||||
|
||||
from mitmproxy.tools.console.commander import commander
|
||||
from mitmproxy.test import taddons
|
||||
import pytest
|
||||
|
||||
|
||||
class TestListCompleter:
|
||||
@ -28,6 +28,18 @@ class TestListCompleter:
|
||||
assert c.cycle() == expected
|
||||
|
||||
|
||||
class TestCommandEdit:
|
||||
def test_open_command_bar(self):
|
||||
with taddons.context() as tctx:
|
||||
history = commander.CommandHistory(tctx.master, size=3)
|
||||
edit = commander.CommandEdit(tctx.master, '', history)
|
||||
|
||||
try:
|
||||
edit.update()
|
||||
except IndexError:
|
||||
pytest.faied("Unexpected IndexError")
|
||||
|
||||
|
||||
class TestCommandHistory:
|
||||
def fill_history(self, commands):
|
||||
with taddons.context() as tctx:
|
||||
|
Loading…
Reference in New Issue
Block a user