/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_commit.py

  • Committer: Martin
  • Date: 2019-06-16 17:36:59 UTC
  • mto: This revision was merged to the branch mainline in revision 7346.
  • Revision ID: gzlist@googlemail.com-20190616173659-rg7ps0f3wfiocsdm
Fix tests that need whoami not to be set

Add override_whoami helper that ensures whoami is not set. Had false
passes due to incomplete test isolation after rename.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    )
39
39
from .. import TestCaseWithTransport
40
40
from ..matchers import ContainsNoVfsCalls
 
41
from ..test_bedding import override_whoami
41
42
 
42
43
 
43
44
class TestCommit(TestCaseWithTransport):
868
869
        with open('foo/foo.txt', 'w') as f:
869
870
            f.write('hello')
870
871
        self.run_bzr(['add'], working_dir='foo')
871
 
        self.overrideEnv('EMAIL', None)
872
 
        self.overrideEnv('BRZ_EMAIL', None)
873
 
        # Also, make sure that it's not inferred from mailname.
874
 
        self.overrideAttr(config, '_auto_user_id',
875
 
                          lambda: (None, None))
 
872
        override_whoami(self)
876
873
        self.run_bzr_error(
877
874
            ['Unable to determine your name'],
878
875
            ['commit', '-m', 'initial'], working_dir='foo')