예제 #1
0
 def setUp(self):
     ViewTest.setUp(self)
     app.config['WTF_CSRF_ENABLED'] = True
     # Normally we'd just use mock.patch to do this, but it's not working
     # with this class for some reason....
     def g(self, x):
         return 111
     self.old_generate_csrf_token = flask_wtf.form.Form.generate_csrf_token
     flask_wtf.form.Form.generate_csrf_token = g
예제 #2
0
    def setUp(self):
        ViewTest.setUp(self)
        app.config['WTF_CSRF_ENABLED'] = True

        # Normally we'd just use mock.patch to do this, but it's not working
        # with this class for some reason....
        def g(self, x):
            return 111

        self.old_generate_csrf_token = flask_wtf.form.Form.generate_csrf_token
        flask_wtf.form.Form.generate_csrf_token = g
예제 #3
0
 def setUp(self):
     ViewTest.setUp(self)
     app.config["WTF_CSRF_ENABLED"] = True
예제 #4
0
파일: test_csrf.py 프로젝트: catlee/balrog
 def setUp(self):
     ViewTest.setUp(self)
     app.config['WTF_CSRF_ENABLED'] = True
예제 #5
0
 def tearDown(self):
     flask_wtf.form.Form.generate_csrf_token = self.old_generate_csrf_token
     ViewTest.tearDown(self)
예제 #6
0
 def tearDown(self):
     flask_wtf.form.Form.generate_csrf_token = self.old_generate_csrf_token
     ViewTest.tearDown(self)