예제 #1
0
파일: tests.py 프로젝트: frankk00/realtor
def setup_func():
    
    #from http://code.google.com/p/nose-gae/issues/detail?id=13
    os.environ['SERVER_NAME'] = 'localhost'
    os.environ['SERVER_PORT'] = '8080'
    os.environ['AUTH_DOMAIN'] = 'example.org'
    os.environ['USER_EMAIL'] = ''
    os.environ['USER_ID'] = ''
    
    
    resource = Resource(name='default', url='/oauth/photo/')
    resource.put()
    
    consumer = Consumer(key_=CONSUMER_KEY, secret=CONSUMER_SECRET, name='printer.example.com')
    consumer.put()
예제 #2
0
def setup_func():

    #from http://code.google.com/p/nose-gae/issues/detail?id=13
    os.environ['SERVER_NAME'] = 'localhost'
    os.environ['SERVER_PORT'] = '8080'
    os.environ['AUTH_DOMAIN'] = 'example.org'
    os.environ['USER_EMAIL'] = ''
    os.environ['USER_ID'] = ''

    resource = Resource(name='default', url='/oauth/photo/')
    resource.put()

    consumer = Consumer(key_=CONSUMER_KEY,
                        secret=CONSUMER_SECRET,
                        name='printer.example.com')
    consumer.put()
예제 #3
0
from oauth_provider.models import Resource,Consumer
from oauth_provider.consts import ACCEPTED



default_consumer = Consumer(name="Tomboy default consumer", 
        description="Tomboy default consumer", 
        key_ = 'anyone',
        secret = 'anyone',
        status = ACCEPTED
        )
default_consumer.put()

default_resource = Resource(name="default")
default_resource.put()