def setUp(self): super(TestMailTask, self).setUp() self.user = fixtures.create_user() self.client = self.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)
def setUp(self): super(TestUserSettings, self).setUp() self.testbed = test_utils.create_testbed() self.user = models.User.create(username='******', first_name='Test', last_name=u'Юзер', email='*****@*****.**')
def setUp(self): self.client = test.Client() self.testbed = test_utils.create_testbed() self.today = datetime.datetime(2015, 6, 12) self.loc_notif = ndb_models.LocationNotification.create( fixtures.LATLNG, 'testuser', u'Test Юзер', recipient_email='*****@*****.**', message=u'Привет')
def setUp(self): self.testbed = test_utils.create_testbed() 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}')
def setUp(self): super(TestCleanupiOSDevicesTask, self).setUp() self.client = self.app.test_client() self.user = fixtures.create_user() self.testbed = test_utils.create_testbed() self.taskq = self.testbed.get_stub(testbed.TASKQUEUE_SERVICE_NAME) # Create devices device_params = [('12', api_args.ANDROID), ('23', api_args.IOS), ('34', api_args.IOS)] self.devices = [ models.Device.get_or_create(self.user, *param) for param in device_params ]
def setUp(self): super(GaeUtilsTest, self).setUp() self.client = self.app.test_client() self.user = fixtures.create_user() 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) # Create devices device_params = [('12', api_args.ANDROID), ('34', api_args.IOS)] for param in device_params: # Both users own both devices models.Device.get_or_create(self.user, *param) self.payload_data = dict(title=u'Test Юзер', message='sent you a new location', type='notification', id=123)
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}')