Esempio n. 1
0
 def setUp(self):
     super(AuthTest, self).setUp()
     self.app = eucaby_app.create_app()
     self.app.config.from_object(test_base.Testing)
     self.app.secret_key = 'development'
     self.user = models.User.create(
         username='******', first_name='Test', last_name=u'Юзер',
         email='*****@*****.**')
Esempio n. 2
0
 def setUp(self):
     self.app = eucaby_app.create_app()
     self.app.config.from_object(test_base.Testing)
     self.cases = (
         (None, '', ''),  # Empty parameters
         (u'Юзер', '', ''),  # Name parameter is set
         (None, 'something', '123'),  # Message type and id are set
         (u'Юзер', api_args.NOTIFICATION, 123))  # All parameters are set
Esempio n. 3
0
 def setUp(self):
     self.client = test.Client()
     self.api_app = eucaby_app.create_app()
     self.api_app.config.from_object(test_base.Testing)
     self.api_client = self.api_app.test_client()
     self.testbed = test_utils.create_testbed()
     self.taskq = self.testbed.get_stub(testbed.TASKQUEUE_SERVICE_NAME)
     self.mail_stub = self.testbed.get_stub(testbed.MAIL_SERVICE_NAME)
     self.today = datetime.datetime(2015, 6, 12)
     self.loc_req = ndb_models.LocationRequest.create(
         'testuser', u'Test Юзер', recipient_email='*****@*****.**',
         message=u'Привет')
     self.user = auth_models.User.objects.create(
         username='******', email='*****@*****.**', first_name='Test',
         last_name=u'Юзер')
     self.user_settings = models.UserSettings.objects.create(
         user=self.user, settings='{"email_subscription": true}')
Esempio n. 4
0
 def setUp(self):
     self.app = eucaby_app.create_app()
     self.app.config.from_object(test_base.Testing)
Esempio n. 5
0
"""Application runner."""

from google.appengine.api import app_identity
from eucaby_api import app as eucaby_app

gae_project_id = app_identity.get_application_id()
app = eucaby_app.create_app()
eucaby_app.config_app(app, gae_project_id)
Esempio n. 6
0
 def setUp(self):
     self.app = eucaby_app.create_app()
     self.app.config.from_object(test_base.Testing)
     self.app.secret_key = 'development'
     self.facebook = auth.facebook
Esempio n. 7
0
 def setUp(self):
     self.app = eucaby_app.create_app()
     self.app.config.from_object(Testing)
     models.db.app = self.app
     models.db.drop_all()  # Drop in case some tables are left
     models.db.create_all()