Exemple #1
0
class CompareIdenticalDatabaseTest(CompareDatabaseTest):
    def setUp(self):
        self.database_1 = Database('assets/merge.kdbx', password='******')
        self.database_2 = Database('assets/merge.kdbx', password='******')

    def test_compare(self):
        changes = self.database_1.compare(self.database_2)
        self.assertSetEqual(
            changes,
            {'Merge Test entry/Test entry with local on top/under Root'})
Exemple #2
0
class CompareDatabaseTest(unittest.TestCase):
    def setUp(self):
        self.database_1 = Database('assets/new.kdbx', password='******')
        self.database_2 = Database('assets/merge.kdbx', password='******')

    def test_compare(self):
        changes = self.database_1.compare(self.database_2)
        self.assertSetEqual(
            changes, {
                'Creating missing Test entry [898c7067a74e4aada0d2a3cf590f8c2a]',
                'Adding custom data KPXC_DECRYPTION_TIME_PREFERENCE [1000]',
                'Adding custom data FDO_SECRETS_EXPOSED_GROUP [{00000000-0000-0000-0000-000000000000}]'
            })
Exemple #3
0
class CompareKeyfileDatabaseTest(CompareDatabaseTest):
    def setUp(self):
        self.database_file_1 = 'assets/keyfile.kdbx'
        self.key_file_1 = 'assets/keyfile.key'
        self.database_1 = Database(self.database_file_1,
                                   key_file=self.key_file_1)

        self.database_file_2 = 'assets/keyfile_2.kdbx'
        self.key_file_2 = 'assets/keyfile_2.key'
        self.database_2 = Database(self.database_file_2,
                                   key_file=self.key_file_2)

    def test_compare(self):
        changes = self.database_1.compare(self.database_2)
        self.assertSetEqual(
            changes, {
                'Merge Entry/Entry 2 with alien on top under Root',
                'Synchronizing from newer source Entry [a81dc75e22344e92b27e78b2af04f251]'
            })