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

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

src/f/l/Flask-Dropbox-HEAD/testapp/tests.py   Flask-Dropbox(Download)
from dropbox.session import DropboxSession
from flask import session, url_for
from flask.ext.dropbox import Dropbox, DropboxBlueprint
from flask.ext.dropbox.extension import OAuthToken
from flask.ext.dropbox.settings import DROPBOX_ACCESS_TOKEN_KEY, \
 
        app.config['DROPBOX_CALLBACK_URL'] = callback_url
        dropbox_obj = Dropbox(app)
 
        with app.test_request_context():
            self.assertIn(quoted_url, dropbox_obj.login_url)
 
    def test_dropbox_init(self):
        dropbox_obj = Dropbox(app)
        app.config['DROPBOX_ACCESS_TYPE'] = 'wrong-access-type'
 
        dropbox_obj = Dropbox(app)
        self.assertRaises(AssertionError, getattr, dropbox_obj, 'session')
 
        app.config['DROPBOX_ACCESS_TYPE'] = choice(('app_folder', 'dropbox'))
        dropbox_obj = Dropbox(app)

src/f/l/Flask-Dropbox-HEAD/testapp/app.py   Flask-Dropbox(Download)
import os
import sys
 
from flask import Flask
from flask.ext.dropbox import Dropbox
 
# Setup Dropbox and script extensions
dropbox = Dropbox(app)
dropbox.register_blueprint(url_prefix='/dropbox')
manager = Manager(app)