~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_config.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-05 19:29:43 UTC
  • mfrom: (3063.3.4 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20071205192943-bii0mqi650ulw5y2
(Lukáš Lalinský) 'log --short/--line' fall back to e-mail if there is no username

Show diffs side-by-side

added added

removed removed

Lines of Context:
1083
1083
        self.assertRaises(errors.NoEmailInUsername,
1084
1084
                          config.extract_email_address, 'Jane Tester')
1085
1085
 
 
1086
    def test_parse_username(self):
 
1087
        self.assertEqual(('', 'jdoe@example.com'),
 
1088
                         config.parse_username('jdoe@example.com'))
 
1089
        self.assertEqual(('', 'jdoe@example.com'),
 
1090
                         config.parse_username('<jdoe@example.com>'))
 
1091
        self.assertEqual(('John Doe', 'jdoe@example.com'),
 
1092
                         config.parse_username('John Doe <jdoe@example.com>'))
 
1093
        self.assertEqual(('John Doe', ''),
 
1094
                         config.parse_username('John Doe'))
 
1095
        self.assertEqual(('John Doe', 'jdoe@example.com'),
 
1096
                         config.parse_username('John Doe jdoe@example.com'))
1086
1097
 
1087
1098
class TestTreeConfig(tests.TestCaseWithTransport):
1088
1099