~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2011-01-11 04:33:12 UTC
  • mto: (5582.12.2 weave-plugin)
  • mto: This revision was merged to the branch mainline in revision 5718.
  • Revision ID: jelmer@samba.org-20110111043312-g4wx6iuf9662f36d
Move weave formats into bzrlib.plugins.weave_fmt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
        # Verify that the environment variable overrides the value
54
54
        # in the file
55
 
        os.environ['BZR_EMAIL'] = 'Different ID <other@environ.ment>'
 
55
        self.overrideEnv('BZR_EMAIL', 'Different ID <other@environ.ment>')
56
56
        whoami = self.run_bzr("whoami")[0]
57
57
        self.assertEquals('Different ID <other@environ.ment>\n', whoami)
58
58
        whoami_email = self.run_bzr("whoami --email")[0]
94
94
    def test_whoami_not_set(self):
95
95
        """Ensure whoami error if username is not set.
96
96
        """
97
 
        osutils.set_or_unset_env('EMAIL', None)
98
 
        osutils.set_or_unset_env('BZR_EMAIL', None)
 
97
        self.overrideEnv('EMAIL', None)
 
98
        self.overrideEnv('BZR_EMAIL', None)
99
99
        out, err = self.run_bzr(['whoami'], 3)
100
100
        self.assertContainsRe(err, 'Unable to determine your name')
101
101