+ def test_data_revert(self):
+ COMMITS = [
+ {u"title": u"one", "author": "bunny", "text":"1.1", "comment": "1"},
+ {u"title": u"one", "author": "frank", "text":"1.2", "comment": "2"},
+ {u"title": u"two", "author": "bunny", "text":"2.1", "comment": "3"},
+ {u"title": u"one", "author": "frank", "text":"1.3", "comment": "4"},
+ ]
+
+ for commit in COMMITS:
+ self.repo.save_text(**commit)
+
+ # now revert last change on one
+ self.repo.revert(u"one", 0)
+ assert_equal(self.repo.page_text(u"one"), (u"1.1", 3))
+ assert_equal(self.repo.page_text(u"two"), (u"2.1", 0))
+
+ self.repo.revert(u"one", 2)
+ assert_equal(self.repo.page_text(u"one"), (u"1.3", 4))