Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(6)  |  Derive(0)  |  Import(1)

src/a/n/anki-sync-server-HEAD/tests/test_rest_app.py   anki-sync-server(Download)
import AnkiServer
from AnkiServer.collection import CollectionManager
from AnkiServer.apps.rest_app import RestApp, RestHandlerRequest, CollectionHandler, ImportExportHandler, NoteHandler, ModelHandler, DeckHandler, CardHandler
 
from webob.exc import *
    def execute(self, name, data):
        ids = ['collection_name']
        func = getattr(self.handler, name)
        req = RestHandlerRequest(self.mock_app, data, ids, {})
        return func(self.collection, req)
    def execute(self, name, data):
        ids = ['collection_name']
        func = getattr(self.handler, name)
        req = RestHandlerRequest(self.mock_app, data, ids, {})
        return func(self.collection, req)
    def execute(self, name, data, note_id):
        ids = ['collection_name', note_id]
        func = getattr(self.handler, name)
        req = RestHandlerRequest(self.mock_app, data, ids, {})
        return func(self.collection, req)
    def execute(self, name, data):
        ids = ['collection_name', '1']
        func = getattr(self.handler, name)
        req = RestHandlerRequest(self.mock_app, data, ids, {})
        return func(self.collection, req)