summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2019-08-17 11:04:36 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2019-08-17 11:10:37 +0100
commitd68617a69c9d8601b919c2db145799d1f5d7edd0 (patch)
tree3fe83e5193c0cffde29a5b082c4e5937efd9ba11 /tests
parentc8986ebe26af6b17a09d714dbdb29d1b34b72c6e (diff)
tests: use new Completer locations
Diffstat (limited to 'tests')
-rw-r--r--tests/test_completion.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py
index 1dca1b08..2258dd27 100644
--- a/tests/test_completion.py
+++ b/tests/test_completion.py
@@ -7,7 +7,8 @@
import unittest
from unittest import mock
-from alot import completion
+from alot.completion.abooks import AbooksCompleter
+from alot.completion.stringlist import StringlistCompleter
# Good descriptive test names often don't fit PEP8, which is meant to cover
# functions meant to be called by humans.
@@ -39,8 +40,8 @@ class AbooksCompleterTest(unittest.TestCase):
def setUpClass(cls):
abook = mock.Mock()
abook.lookup = _mock_lookup
- cls.empty_abook_completer = completion.AbooksCompleter([])
- cls.example_abook_completer = completion.AbooksCompleter([abook])
+ cls.empty_abook_completer = AbooksCompleter([])
+ cls.example_abook_completer = AbooksCompleter([abook])
def test_empty_address_book_returns_empty_list(self):
actual = self.__class__.empty_abook_completer.complete('real-name', 9)
@@ -97,7 +98,7 @@ class AbooksCompleterTest(unittest.TestCase):
class StringlistCompleterTest(unittest.TestCase):
def test_dont_choke_on_special_regex_characters(self):
tags = ['[match]', 'nomatch']
- completer = completion.StringlistCompleter(tags)
+ completer = StringlistCompleter(tags)
actual = completer.complete('[', 1)
expected = [(tags[0], len(tags[0]))]
self.assertListEqual(actual, expected)