~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_whoami.py

  • Committer: Aaron Bentley
  • Date: 2010-05-10 11:34:20 UTC
  • mfrom: (5218 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5221.
  • Revision ID: aaron@aaronbentley.com-20100510113420-toh2d5yioobb5uq1
Merged bzr.dev into transform-commit-full.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import os
21
21
 
22
22
import bzrlib
 
23
from bzrlib import osutils
23
24
from bzrlib.branch import Branch
24
25
from bzrlib.tests.blackbox import ExternalBase
25
26
 
111
112
        self.assertEquals('"Branch Identity" does not seem to contain an '
112
113
                          'email address.  This is allowed, but not '
113
114
                          'recommended.\n', display)
 
115
 
 
116
    def test_whoami_not_set(self):
 
117
        """Ensure whoami error if username is not set.
 
118
        """
 
119
        osutils.set_or_unset_env('EMAIL', None)
 
120
        osutils.set_or_unset_env('BZR_EMAIL', None)
 
121
        out, err = self.run_bzr(['whoami'], 3)
 
122
        self.assertContainsRe(err, 'Unable to determine your name')