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

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

src/f/l/Flask-CouchDB-Schematics-1.0.0/tests/test_flask_couchdb.py   Flask-CouchDB-Schematics(Download)
    def test_add_viewdef(self):
        vd = flask.ext.couchdb.ViewDefinition('tests', 'all', '''\
             function(doc) {
                emit(doc._id, null);
             }''')
    def test_running_standalone_views(self):
        viewdef = flask.ext.couchdb.ViewDefinition('tests', 'active', '''\
            function (doc) {
                if (doc.active) {
                    emit(doc.username, doc.fullname)
            for d in SAMPLE_DATA:
                flask.g.couch.db.save(d)
            results = tuple(viewdef())
            assert len(results) == 2
            goal = ['fred', 'steve']

src/f/l/Flask-CouchDB-Schematics-1.0.0/tests/test_flask_couchdb_schematics.py   Flask-CouchDB-Schematics(Download)
    def test_add_viewdef(self):
        vd = flask.ext.couchdb.ViewDefinition('tests', 'all', '''\
             function(doc) {
                emit(doc._id, null);
             }''')
    def test_running_standalone_views(self):
        viewdef = flask.ext.couchdb.ViewDefinition('tests', 'active', '''\
            function (doc) {
                if (doc.active) {
                    emit(doc.username, doc.fullname)
            for d in SAMPLE_DATA:
                flask.g.couch.db.save(d)
            results = tuple(viewdef())
            assert len(results) == 2
            goal = ['fred', 'steve']