Explorar el Código

modify the test database name, complete new node test

oz123 hace 11 años
padre
commit
1c25c925c9
Se han modificado 2 ficheros con 6 adiciones y 1 borrados
  1. 5 0
      tests/db_tests.py
  2. 1 1
      tests/test_pwman.py

+ 5 - 0
tests/db_tests.py

@@ -75,6 +75,11 @@ class DBTests(unittest.TestCase):
         node.set_tags(tags)
         self.db.open()
         self.db.addnodes([node])
+        idx_created = node._id
+        new_node = self.db.getnodes([idx_created])[0]
+        for key, attr in {'password': password, 'username': username,
+                          'url': url, 'notes': notes}.iteritems():
+            self.assertEquals(attr, eval('new_node.'+key))
         self.db.close()
 
 

+ 1 - 1
tests/test_pwman.py

@@ -65,7 +65,7 @@ try:
                                  },
                       'Database': {'type': 'SQLite',
                                    'filename': os.path.join("tests",
-                                                            "pwman.db")},
+                                                            "test.pwman.db")},
                       'Encryption': {'algorithm': 'AES'},
                       'Readline': {'history': os.path.join("tests",
                                                            "history")}