diff options
Diffstat (limited to 'test/test_completion.py')
-rw-r--r-- | test/test_completion.py | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/test/test_completion.py b/test/test_completion.py index 4c5bc400..1a970470 100644 --- a/test/test_completion.py +++ b/test/test_completion.py @@ -5,23 +5,35 @@ Test the completions methods on an altered input object. import string import pytest import random +from poezio import config +from poezio.windows import Input + class ConfigShim(object): def get(self, *args, **kwargs): return '' + def getbool(self, *args, **kwargs): + return False + -from poezio import config config.config = ConfigShim() -from poezio.windows import Input + +class SubInput(Input): + def resize(self, *args, **kwargs): + pass + def rewrite_text(self, *args, **kwargs): + pass + def refresh(self, *args, **kwargs): + pass + @pytest.fixture(scope="function") def input_obj(): - obj = Input() + from poezio.windows import base_wins + base_wins.TAB_WIN = True + obj = SubInput() obj.reset_completion() - obj.resize = lambda: None - obj.rewrite_text = lambda: None - obj.refresh = lambda: None return obj @pytest.fixture(scope="module") |