~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-01-11 15:45:55 UTC
  • mfrom: (5588.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20110111154555-xmu386vs0qoigyhl
(vila) Document the packaging helper scripts. (Max Bowsher)

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