diff tests/test-context.py @ 95:bd23bc72e662

client: add a convenience method __getitem__ to return a changectx
author Idan Kamara <idankk86@gmail.com>
date Thu, 22 Dec 2011 19:12:47 +0200
parents 4da6bb8abfcc
children c635e6e7054f
line wrap: on
line diff
--- a/tests/test-context.py	Thu Dec 22 19:12:47 2011 +0200
+++ b/tests/test-context.py	Thu Dec 22 19:12:47 2011 +0200
@@ -13,7 +13,7 @@
         self.append('c', 'c')
         rev1, node1 = self.client.commit('second', addremove=True)
 
-        ctx = context.changectx(self.client, node0)
+        ctx = self.client[node0]
 
         self.assertEquals(ctx.description(), 'first')
         self.assertEquals(str(ctx), node0[:12])
@@ -52,7 +52,7 @@
 
         self.client.tag('tag', rev=node0)
         # tags are read on construction
-        self.assertEquals(context.changectx(self.client, node0).tags(), ['tag'])
+        self.assertEquals(self.client[node0].tags(), ['tag'])
 
     def test_construction(self):
         self.append('a', 'a')