partial backport of support for adbh's new interface to backup_command and restore_command
these methods can return lists or strings which are passed to subprocess.call
without or with the shell=True parameter respectively.
""":organization: Logilab:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses"""importsysfromStringIOimportStringIOfromlogilab.common.testlibimportTestCase,unittest_mainfromcubicweb.devtoolsimportinit_test_databasefromcubicweb.server.checkintegrityimportcheckrepo,cnx=init_test_database('sqlite')classCheckIntegrityTC(TestCase):deftest(self):sys.stderr=sys.stdout=StringIO()try:check(repo,cnx,('entities','relations','text_index','metadata'),True,True)finally:sys.stderr=sys.__stderr__sys.stdout=sys.__stdout__if__name__=='__main__':unittest_main()