Rev 1204: Use new API in branchprop tests. in file:///data/jelmer/bzr-svn/fast-tests/

Jelmer Vernooij jelmer at samba.org
Thu Jun 5 03:17:58 BST 2008


At file:///data/jelmer/bzr-svn/fast-tests/

------------------------------------------------------------
revno: 1204
revision-id: jelmer at samba.org-20080605021758-uycxw84s4z3dybe4
parent: jelmer at samba.org-20080605021247-ctvc6z4gkf6uuwim
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: fast-tests
timestamp: Thu 2008-06-05 04:17:58 +0200
message:
  Use new API in branchprop tests.
modified:
  tests/test_branchprops.py      test_branchprops.py-20061223210444-04xf5224zcg69m3w-1
=== modified file 'tests/test_branchprops.py'
--- a/tests/test_branchprops.py	2008-06-04 15:20:12 +0000
+++ b/tests/test_branchprops.py	2008-06-05 02:17:58 +0000
@@ -31,12 +31,15 @@
         return CachingLogWalker(LogWalker(transport=transport))
 
     def test_get_old_properties(self):
-        repos_url = self.make_client('d', 'dc')
-        self.client_set_prop("dc", "myprop", "data")
-        self.client_commit("dc", "My Message")
-        self.build_tree({'dc/foo': "bla"})
-        self.client_add("dc/foo")
-        self.client_commit("dc", "My Message")
+        repos_url = self.make_repository('d')
+
+        dc = self.commit_editor(repos_url)
+        dc.change_dir_prop("", "myprop", "data")
+        dc.done()
+
+        dc = self.commit_editor(repos_url)
+        dc.add_file("foo")
+        dc.done()
 
         logwalk = self.get_log_walker(transport=SvnRaTransport(repos_url))
 
@@ -45,9 +48,11 @@
         self.assertEqual("data", bp.get_properties("", 2)["myprop"])
 
     def test_get_properties(self):
-        repos_url = self.make_client('d', 'dc')
-        self.client_set_prop("dc", "myprop", "data")
-        self.client_commit("dc", "My Message")
+        repos_url = self.make_repository('d')
+
+        dc = self.commit_editor(repos_url)
+        dc.change_dir_prop("", "myprop", "data")
+        dc.done()
 
         transport = SvnRaTransport(repos_url)
         logwalk = self.get_log_walker(transport=transport)
@@ -61,16 +66,19 @@
         self.assertTrue("svn:entry:committed-date" in props)
 
     def test_get_changed_properties(self):
-        repos_url = self.make_client('d', 'dc')
-        self.client_set_prop("dc", "myprop", "data\n")
-        self.client_commit("dc", "My Message")
-        self.client_update("dc")
-        self.client_set_prop("dc", "myprop", "newdata\n")
-        self.client_commit("dc", "My Message")
-        self.client_update("dc")
-        self.client_set_prop("dc", "myp2", "newdata\n")
-        self.client_commit("dc", "My Message")
-        self.client_update("dc")
+        repos_url = self.make_repository('d')
+
+        dc = self.commit_editor(repos_url)
+        dc.change_dir_prop("", "myprop", "data\n")
+        dc.done()
+
+        dc = self.commit_editor(repos_url)
+        dc.change_dir_prop("", "myprop", "newdata\n")
+        dc.done()
+
+        dc = self.commit_editor(repos_url)
+        dc.change_dir_prop("", "myp2", "newdata\n")
+        dc.done()
 
         logwalk = self.get_log_walker(transport=SvnRaTransport(repos_url))
 




More information about the bazaar-commits mailing list