コード例 #1
0
 def _fixture(self, request):
     from kedja import root_factory
     root = root_factory(request)
     root['wall'] = request.registry.content('Wall', rid=2)
     root['wall']['collection'] = request.registry.content('Collection',
                                                           rid=3)
     commit()
     return root
コード例 #2
0
 def _fixture(self, request):
     from kedja import root_factory
     root = root_factory(request)
     root['users']['10'] = user = request.registry.content('User', rid=10, first_name='Jeff')
     cred = request.registry.content('Credentials', '10')
     cred.save()
     commit()
     return root, cred
コード例 #3
0
 def _fixture(self, request):
     from kedja import root_factory
     root = root_factory(request)
     content = request.registry.content
     root['wall'] = wall = content('Wall', rid=2)
     root['wall']['collection'] = collection = content('Collection', rid=3)
     collection['cardA'] = content('Card', rid=10)
     collection['cardB'] = content('Card', rid=20)
     collection['cardC'] = content('Card', rid=30)
     wall.relations_map[1] = [10, 20]
     commit()
     return root
コード例 #4
0
ファイル: test_auth.py プロジェクト: schyffel/kedja_server
 def _fixture(self, request):
     from kedja import root_factory
     root = root_factory(request)
     root['users']['10'] = request.registry.content('User', rid=10)
     commit()
     return root