From d0693a007d2dcd793cedc52d2215265a28585fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beyza=20Ermi=C5=9F?= Date: Thu, 10 Jul 2008 12:56:54 +0000 Subject: [PATCH] History test cas ehas been added. --- tests/historytest.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/historytest.py diff --git a/tests/historytest.py b/tests/historytest.py new file mode 100644 index 00000000..7cd5bd49 --- /dev/null +++ b/tests/historytest.py @@ -0,0 +1,26 @@ +import unittest +import pisi.relation + +class HistoryTestCase(unittest.TestCase): + + def testCreate(self): + history = pisi.history.History() + operation = 'upgrade' + history.create(operation) + history.create('install') + history.create('snapshot') + + def testGetLatest(self): + history = pisi.history.History() + history.read('history/001_upgrade.xml') + assert '099' == history._get_latest() + + history.read('history/002_remove.xml') + assert '099' == history._get_latest() + + + + + + +