示例#1
0
 def test_import_validation_error(self):
     """
     tests if error is returned correctly.
     Needed after task was run through celery
     """
     with app.test_request_context():
         speaker = Speaker(name='SP',
                           email='invalid_email',
                           organisation='org',
                           country='japan',
                           event_id=1)
         save_to_db(speaker, 'speaker invalid saved')
     self._test_import_error(checks=['Invalid', 'email', '400'])
 def test_import_validation_error(self):
     """
     tests if error is returned correctly.
     Needed after task was run through celery
     """
     with app.test_request_context():
         speaker = Speaker(
             name='SP',
             email='invalid_email',
             organisation='org',
             country='japan',
             event_id=1)
         save_to_db(speaker, 'speaker invalid saved')
     self._test_import_error(
         checks=['Invalid', 'email', '400']
     )