summaryrefslogtreecommitdiff
path: root/tests/addressbook
diff options
context:
space:
mode:
authorLucas Hoffmann <l-m-h@web.de>2017-06-08 16:18:18 +0200
committerLucas Hoffmann <l-m-h@web.de>2017-06-08 16:18:18 +0200
commit1c72a19d59c24a5621180118b779de22d2e9ea34 (patch)
tree0b3c9b2bbb8a168c3f6de23021ca0b9307a60b64 /tests/addressbook
parent6affff711d357155eae49f595a0112aaff04ed8b (diff)
Split up test case to see expected failure
Diffstat (limited to 'tests/addressbook')
-rw-r--r--tests/addressbook/external_test.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/addressbook/external_test.py b/tests/addressbook/external_test.py
index 1459348d..059140a6 100644
--- a/tests/addressbook/external_test.py
+++ b/tests/addressbook/external_test.py
@@ -45,10 +45,18 @@ class TestExternalAddressbookGetContacts(unittest.TestCase):
expected = [('me', '<me@example.com>'), ('you', '<you@other.domain>')]
self.assertListEqual(actual, expected)
- def test_returns_empty_list_if_regex_has_no_name_and_email_submatches(self):
+ def test_returns_empty_list_if_regex_has_no_name_submatches(self):
abook = external.ExternalAddressbook(
- 'foobar', self.regex.replace('name', 'xname').replace('email',
- 'xemail'))
+ 'foobar', self.regex.replace('name', 'xname'))
+ with self._patch_call_cmd(
+ ('me\t<me@example.com>\nyou\t<you@other.domain>', '', 0)):
+ actual = abook.get_contacts()
+ self.assertListEqual(actual, [])
+
+ @unittest.expectedFailure
+ def test_returns_empty_list_if_regex_has_no_email_submatches(self):
+ abook = external.ExternalAddressbook(
+ 'foobar', self.regex.replace('email', 'xemail'))
with self._patch_call_cmd(
('me\t<me@example.com>\nyou\t<you@other.domain>', '', 0)):
actual = abook.get_contacts()