Example #1
0
 def __init__(self):
     self._path = None
     self._listener = None
     self._dbconn = None
     self._item_type = None
     self._item_prototype = None
     self._subitem_prototypes = qvarn.SubItemPrototypes()
     self._file_resource_name = None
Example #2
0
 def __init__(self):
     self._path = None
     self._item_type = None
     self._item_prototype = None
     self._item_validator = self._no_validator
     self._subitem_prototypes = qvarn.SubItemPrototypes()
     self._listener = None
     self._dbconn = None
Example #3
0
 def __init__(self):
     self._item_type = None
     self._prototype = None
     self._subitem_prototypes = qvarn.SubItemPrototypes()
     self._m = None
Example #4
0
 def __init__(self):
     self._item_type = None
     self._prototype = None
     self._subitem_prototypes = qvarn.SubItemPrototypes()
     self._id_generator = qvarn.ResourceIdGenerator()
     self._revision_id_type = 'revision id'
Example #5
0
 def test_gets_added_prototype(self):
     sip = qvarn.SubItemPrototypes()
     prototype = {u'subifield': u''}
     sip.add(u'fooitem', u'foosub', prototype)
     added = sip.get(u'fooitem', u'foosub')
     self.assertEqual(added, prototype)
Example #6
0
 def test_adds_prototype(self):
     sip = qvarn.SubItemPrototypes()
     prototype = {u'subifield': u''}
     sip.add(u'fooitem', u'foosub', prototype)
     self.assertEqual(sip.get_all(), [(u'foosub', prototype)])
Example #7
0
 def test_has_nothing_initially(self):
     sip = qvarn.SubItemPrototypes()
     self.assertEqual(sip.get_all(), [])