Rev 1348: Add tests for get_locations. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4

Jelmer Vernooij jelmer at samba.org
Thu Jun 26 13:47:39 BST 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/0.4

------------------------------------------------------------
revno: 1348
revision-id: jelmer at samba.org-20080626124738-97ghchm8w05apcjd
parent: jelmer at samba.org-20080625091314-ofzq6mbveo9rq9q2
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Thu 2008-06-26 14:47:38 +0200
message:
  Add tests for get_locations.
modified:
  tests/test_ra.py               test_ra.py-20080313141743-uzsm7ejitrlqone5-1
=== modified file 'tests/test_ra.py'
--- a/tests/test_ra.py	2008-06-23 15:40:18 +0000
+++ b/tests/test_ra.py	2008-06-26 12:47:38 +0000
@@ -140,6 +140,19 @@
         self.assertEquals("/bar", rets[0][0])
         self.assertEquals("/bar", rets[1][0])
 
+    def test_get_locations_root(self):
+        self.assertEquals({0: "/"}, ra.get_locations("", 0, [0]))
+
+    def test_get_locations_dir(self):
+        cb = self.commit_editor()
+        cb.add_dir("bar")
+        cb.close()
+
+        cb = self.commit_editor()
+        cb.add_dir("bla", "bar", 1)
+        cb.close()
+
+        self.assertEquals({1: "/bar", 2: "/bla"}, ra.get_locations("bla", 1, [1,2]))
 
 class AuthTests(TestCase):
     def test_not_registered(self):




More information about the bazaar-commits mailing list