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
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
def __init__(self): self._item_type = None self._prototype = None self._subitem_prototypes = qvarn.SubItemPrototypes() self._m = None
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'
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)
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)])
def test_has_nothing_initially(self): sip = qvarn.SubItemPrototypes() self.assertEqual(sip.get_all(), [])