Rev 5760: Split store tests between readonly and mutable ones. in file:///home/vila/src/bzr/experimental/config/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Wed Apr 6 12:54:41 UTC 2011
At file:///home/vila/src/bzr/experimental/config/
------------------------------------------------------------
revno: 5760
revision-id: v.ladeuil+lp at free.fr-20110406125441-sldoscgyc5th45op
parent: v.ladeuil+lp at free.fr-20110406091248-etv6v9nccqultweu
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: config-abstract-store
timestamp: Wed 2011-04-06 14:54:41 +0200
message:
Split store tests between readonly and mutable ones.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_config.py'
--- a/bzrlib/tests/test_config.py 2011-04-05 17:39:34 +0000
+++ b/bzrlib/tests/test_config.py 2011-04-06 12:54:41 +0000
@@ -1889,7 +1889,7 @@
self.assertEquals(config._Created, section.orig['foo'])
-class TestStore(tests.TestCaseWithTransport):
+class TestReadonlyStore(tests.TestCaseWithTransport):
# FIXME: parametrize against all valid (store, transport) combinations
@@ -1897,7 +1897,7 @@
if name is None:
name = 'foo.conf'
if content is None:
- store = config.ConfigObjStore(self.get_transport(), name)
+ store = config.ConfigObjStore(self.get_readonly_transport(), name)
else:
store = config.ConfigObjStore.from_string(
content, self.get_transport(), name)
@@ -2002,6 +2002,21 @@
('baz', {'foo_in_baz': 'barbaz', 'qux': {'foo_in_qux': 'quux'}}),
sections[3])
+
+class TestMutableStore(tests.TestCaseWithTransport):
+
+ # FIXME: parametrize against all valid (store, transport) combinations
+
+ def get_store(self, name=None, content=None):
+ if name is None:
+ name = 'foo.conf'
+ if content is None:
+ store = config.ConfigObjStore(self.get_transport(), name)
+ else:
+ store = config.ConfigObjStore.from_string(
+ content, self.get_transport(), name)
+ return store
+
def test_set_option_in_empty_file(self):
store = self.get_store('foo.conf')
section = store.get_mutable_section(None)
More information about the bazaar-commits
mailing list