summaryrefslogtreecommitdiff
path: root/tests/settings/manager_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/settings/manager_test.py')
-rw-r--r--tests/settings/manager_test.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/settings/manager_test.py b/tests/settings/manager_test.py
index e82d5f27..21439403 100644
--- a/tests/settings/manager_test.py
+++ b/tests/settings/manager_test.py
@@ -188,7 +188,7 @@ class TestSettingsManagerExpandEnvironment(unittest.TestCase):
class TestSettingsManagerGetAccountByAddress(utilities.TestCaseClassCleanup):
- """Test the get_account_by_address helper."""
+ """Test the account_matching_address helper."""
@classmethod
def setUpClass(cls):
@@ -216,17 +216,17 @@ class TestSettingsManagerGetAccountByAddress(utilities.TestCaseClassCleanup):
cls.manager.read_config(f.name)
def test_exists_addr(self):
- acc = self.manager.get_account_by_address(u'that_guy@example.com')
+ acc = self.manager.account_matching_address(u'that_guy@example.com')
self.assertEqual(acc.realname, 'That Guy')
def test_doesnt_exist_return_default(self):
- acc = self.manager.get_account_by_address(u'doesntexist@example.com',
- return_default=True)
+ acc = self.manager.account_matching_address(u'doesntexist@example.com',
+ return_default=True)
self.assertEqual(acc.realname, 'That Guy')
def test_doesnt_exist_raise(self):
with self.assertRaises(NoMatchingAccount):
- self.manager.get_account_by_address(u'doesntexist@example.com')
+ self.manager.account_matching_address(u'doesntexist@example.com')
def test_doesnt_exist_no_default(self):
with tempfile.NamedTemporaryFile() as f:
@@ -234,11 +234,11 @@ class TestSettingsManagerGetAccountByAddress(utilities.TestCaseClassCleanup):
settings = SettingsManager()
settings.read_config(f.name)
with self.assertRaises(NoMatchingAccount):
- settings.get_account_by_address('that_guy@example.com',
- return_default=True)
+ settings.account_matching_address('that_guy@example.com',
+ return_default=True)
def test_real_name_will_be_stripped_before_matching(self):
- acc = self.manager.get_account_by_address(
+ acc = self.manager.account_matching_address(
'That Guy <a_dude@example.com>')
self.assertEqual(acc.realname, 'A Dude')
@@ -249,6 +249,6 @@ class TestSettingsManagerGetAccountByAddress(utilities.TestCaseClassCleanup):
considered the same. Among servers that do this gmail, yahoo, fastmail,
anything running Exchange (i.e., most large corporations), and others.
"""
- acc1 = self.manager.get_account_by_address('That_guy@example.com')
- acc2 = self.manager.get_account_by_address('that_guy@example.com')
+ acc1 = self.manager.account_matching_address('That_guy@example.com')
+ acc2 = self.manager.account_matching_address('that_guy@example.com')
self.assertIs(acc1, acc2)