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()
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()