/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 bzrlib/tests/test_config.py

  • Committer: Vincent Ladeuil
  • Date: 2011-04-04 16:52:54 UTC
  • mto: (5743.5.1 config-concrete-stores)
  • mto: This revision was merged to the branch mainline in revision 5832.
  • Revision ID: v.ladeuil+lp@free.fr-20110404165254-4r7a8mw4dzbu4mg8
Basic store.set implementation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1960
1960
        self.assertEquals(('baz', {'foo': 'bar'}), sections[0])
1961
1961
 
1962
1962
    def test_get_embedded_sections(self):
 
1963
        # A more complicated example (which also shows that section names and
 
1964
        # option names share the same name space...)
1963
1965
        store = self.get_store('foo.conf', '''
1964
1966
foo=bar
1965
1967
l=1,2
1985
1987
                                   'qux': {'foo_in_qux': 'quux'}}),
1986
1988
                          sections[3])
1987
1989
 
 
1990
    def test_set_in_default_section(self):
 
1991
        store = self.get_store('foo.conf', '')
 
1992
        store.set('foo', 'bar')
 
1993
        store.save()
 
1994
        self.assertFileEqual('foo = bar\n', 'foo.conf')
 
1995
 
 
1996
    def test_set_in_named_section(self):
 
1997
        store = self.get_store('foo.conf', '')
 
1998
        store.set('foo', 'bar', 'baz')
 
1999
        store.save()
 
2000
        self.assertFileEqual('[baz]\nfoo = bar\n', 'foo.conf')
 
2001
 
1988
2002
 
1989
2003
class TestConfigGetOptions(tests.TestCaseWithTransport, TestOptionsMixin):
1990
2004