Ejemplo n.º 1
0
 def setUp(self):
     self.app, app_teardown = create_mock_app()
     self.addCleanup(app_teardown)
     self.client = self.app.test_client()
     with self.client.session_transaction() as session:
         session["logged_in_email"] = "*****@*****.**"
     self.client.post('/meeting/1/participant/new', data={
         'personal_first_name': u"Joe",
         'personal_last_name': u"Smith",
         'personal_email': u"*****@*****.**",
     })
Ejemplo n.º 2
0
 def setUp(self):
     self.app, cleanup_app = create_mock_app()
     self.app.config['FRAME_URL'] = 'ze_frame_url'
     self.addCleanup(cleanup_app)
     requests_patch = patch('frame.requests')
     self.mock_requests = requests_patch.start()
     self.addCleanup(requests_patch.stop)
     self.mock_requests.get.return_value.status_code = 200
     self.mock_requests.get.return_value.headers = {
         'content-type': 'application/json'}
     self._set_frame_response({'frame_html': "hello framed page!"})
Ejemplo n.º 3
0
    def setUp(self):
        self.app, cleanup_app = create_mock_app()
        self.addCleanup(cleanup_app)
        self.app.config['SKIP_EDIT_AUTHORIZATION'] = False
        self.mock_roles = []

        @self.app.before_request
        def set_roles():
            flask.g.user_roles = self.mock_roles

        @self.app.route('/edit_permission_test')
        @views.require_edit_permission
        def edit_permission_test():
            return self.ok_msg
Ejemplo n.º 4
0
 def setUp(self):
     from common import create_mock_app
     self.app, app_teardown = create_mock_app()
     self.addCleanup(app_teardown)
     self.report_data = {}
     self.report_data.update(schema.ReportSchema.from_defaults().flatten())
     self.report_data.update(schema.SerisReviewSchema.from_defaults().flatten())
     data = {
         u'format_availability_paper_or_web': u'paper only',
         u'format_lang_of_pub': u'ro',
         u'format_availability_costs': u'free',
         u'details_original_name': u'asds3923x.@',
         u'details_original_language': u'ro',
         u'header_country': u'Romania',
         u'header_uploader': u'Report Guru',
         u'links_reference_global_level': u'on'
     }
     self.report_data.update(data)
Ejemplo n.º 5
0
 def setUp(self):
     from common import create_mock_app
     self.app, app_teardown = create_mock_app()
     self.addCleanup(app_teardown)
     self.report_data = {}
     self.report_data.update(schema.ReportSchema.from_defaults().flatten())
     self.report_data.update(
         schema.SerisReviewSchema.from_defaults().flatten())
     data = {
         u'format_availability_paper_or_web': u'paper only',
         u'format_lang_of_pub': u'ro',
         u'format_availability_costs': u'free',
         u'details_original_name': u'asds3923x.@',
         u'details_original_language': u'ro',
         u'header_country': u'Romania',
         u'header_uploader': u'Report Guru',
         u'links_reference_global_level': u'on'
     }
     self.report_data.update(data)
Ejemplo n.º 6
0
 def setUp(self):
     self.app, app_teardown = create_mock_app()
     self.addCleanup(app_teardown)
     self.client = self.app.test_client()
Ejemplo n.º 7
0
 def setUp(self):
     self.app, app_teardown = create_mock_app()
     self.addCleanup(app_teardown)
     self.client = self.app.test_client()
     with self.client.session_transaction() as session:
         session["logged_in_email"] = "*****@*****.**"
Ejemplo n.º 8
0
 def setUp(self):
     self.app, cleanup_app = create_mock_app()
     self.app.config['FRAME_URL'] = 'ze_frame_url'
     self.addCleanup(cleanup_app)