示例#1
0
文件: __init__.py 项目: zzmjohn/papis
    def setUpClass(cls):
        backend = papis.config.get('database-backend')
        tests.setup_test_library()
        papis.config.set('database-backend', backend)

        libdir = papis.config.get_lib().paths[0]
        assert (os.path.exists(libdir))
        assert (papis.config.get_lib_name() == tests.get_test_lib_name())

        database = papis.database.get(papis.config.get_lib_name())
        database.clear()
        database.initialize()
        assert (database is not None)
示例#2
0
文件: __init__.py 项目: zzmjohn/papis
 def test_check_database(self):
     database = papis.database.get()
     self.assertTrue(database is not None)
     self.assertTrue(database.get_lib() == tests.get_test_lib_name())
示例#3
0
 def test_lib_is_correct(self):
     assert (papis.config.utils.get_lib_name() == tests.get_test_lib_name())
示例#4
0
文件: cli.py 项目: olantwin/papis-1
 def setUp(self):
     from click.testing import CliRunner
     self.runner = CliRunner()
     self.assertTrue(
         papis.config.get_lib_name() == tests.get_test_lib_name())