~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: 2006-06-30 20:03:09 UTC
  • mfrom: (1824.1.1 branch)
  • Revision ID: pqm@pqm.ubuntu.com-20060630200309-cf230b3c813bbc35
Add BranchConfig.has_explicit_nickname call.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from bzrlib.branch import Branch
28
28
from bzrlib.bzrdir import BzrDir
29
29
import bzrlib.errors as errors
30
 
from bzrlib.tests import TestCase, TestCaseInTempDir
 
30
from bzrlib.tests import TestCase, TestCaseInTempDir, TestCaseWithTransport
31
31
 
32
32
 
33
33
sample_long_alias="log -r-15..-1 --line"
321
321
                                          'utf-8')])
322
322
 
323
323
 
324
 
class TestBranchConfig(TestCaseInTempDir):
 
324
class TestBranchConfig(TestCaseWithTransport):
325
325
 
326
326
    def test_constructs(self):
327
327
        branch = FakeBranch()
348
348
        my_config2 = b2.get_config()
349
349
        self.assertEqual(my_config2.get_user_option('wacky'), 'unlikely')
350
350
 
 
351
    def test_has_explicit_nickname(self):
 
352
        b = self.make_branch('.')
 
353
        self.assertFalse(b.get_config().has_explicit_nickname())
 
354
        b.nick = 'foo'
 
355
        self.assertTrue(b.get_config().has_explicit_nickname())
 
356
 
351
357
 
352
358
class TestGlobalConfigItems(TestCase):
353
359