|
@@ -19,7 +19,7 @@
|
|
|
import os
|
|
|
import unittest
|
|
|
from pwman.data.drivers.sqlite import SQLite
|
|
|
-
|
|
|
+from pwman.data.nodes import Node
|
|
|
|
|
|
class TestSQLite(unittest.TestCase):
|
|
|
def setUp(self):
|
|
@@ -43,8 +43,11 @@ class TestSQLite(unittest.TestCase):
|
|
|
self.assertListEqual([u'foo', u'bar'], list(f))
|
|
|
|
|
|
def test_3_add_node(self):
|
|
|
- node = ("alice", "secret", "wonderland.com", "a really great place",
|
|
|
- ['foo', 'bar'])
|
|
|
+ node = Node(clear_text=True,
|
|
|
+ **{'username': u"alice", 'password': u"secret",
|
|
|
+ 'url': u"wonderland.com",
|
|
|
+ 'notes': u"a really great place",
|
|
|
+ 'tags': [u'foo', u'bar']})
|
|
|
self.db.add_node(node)
|
|
|
rv = self.db._cur.execute("select * from node")
|
|
|
self.assertIn('alice', rv.fetchone())
|