|
@@ -21,14 +21,12 @@ from pwman.data.nodes import NewNode
|
|
|
from pwman.data.tags import TagNew
|
|
|
from pwman.data import factory
|
|
|
from pwman.data.drivers.sqlite import DatabaseException, SQLiteDatabaseNewForm
|
|
|
-from pwman.util import config
|
|
|
from pwman.util.config import get_pass_conf
|
|
|
from pwman.util.generator import leetlist
|
|
|
from pwman.util.crypto_engine import CryptoEngine
|
|
|
-from pwman import default_config, set_xsel
|
|
|
from pwman.ui import get_ui_platform
|
|
|
from pwman.ui.tools import CMDLoop, CliMenuItem
|
|
|
-from pwman import (parser_options, get_conf_options, get_conf, set_umask)
|
|
|
+
|
|
|
from pwman.data.database import __DB_FORMAT__
|
|
|
import sys
|
|
|
import unittest
|
|
@@ -173,34 +171,6 @@ class DBTests(unittest.TestCase):
|
|
|
self.assertEqual("test", db._filename)
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
class CLITests(unittest.TestCase):
|
|
|
|
|
|
"""
|
|
@@ -373,11 +343,11 @@ class CLITests(unittest.TestCase):
|
|
|
class FactoryTest(unittest.TestCase):
|
|
|
|
|
|
def test_factory_check_db_ver(self):
|
|
|
- self.assertEquals(factory.check_db_version('SQLite', testdb), 0.5)
|
|
|
+ self.assertEqual(factory.check_db_version('SQLite', testdb), 0.5)
|
|
|
|
|
|
def test_factory_check_db_file(self):
|
|
|
factory.create('SQLite', version='0.3', filename='baz.db')
|
|
|
- self.assertEquals(factory.check_db_version('SQLite', 'baz.db'), 0.3)
|
|
|
+ self.assertEqual(factory.check_db_version('SQLite', 'baz.db'), 0.3)
|
|
|
os.unlink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