From 7268894c8531bbeb934e4efbc986aa6236fd19c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Wed, 15 Feb 2006 00:29:30 +0000 Subject: [PATCH] * a test by cartman for bug 1909 --- tests/repodbtests.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/repodbtests.py diff --git a/tests/repodbtests.py b/tests/repodbtests.py new file mode 100644 index 00000000..e8fd76ff --- /dev/null +++ b/tests/repodbtests.py @@ -0,0 +1,31 @@ +# Copyright (C) 2005, TUBITAK/UEKAE +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# Please read the COPYING file. +# + +import unittest +import os + +import pisi.context as ctx +import pisi.api +import pisi.installdb +from pisi import util + +import testcase +class RepoDBTestCase(testcase.TestCase): + + def testAddRemoveCycle(self): + # written by cartman the celebrity, for bug #1909 + pisi.api.add_repo("foo","bar") + + for i in range(2): + print '\nTest %d\n' % (i) + pisi.api.remove_repo("foo") + pisi.api.add_repo("foo","bar") + +suite = unittest.makeSuite(RepoDBTestCase)