Example #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
Example #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
Example #3
0
 def setUp(self):
     ViewTest.setUp(self)
     app.config["WTF_CSRF_ENABLED"] = True
Example #4
0
 def setUp(self):
     ViewTest.setUp(self)
     app.config['WTF_CSRF_ENABLED'] = True
Example #5
0
 def tearDown(self):
     flask_wtf.form.Form.generate_csrf_token = self.old_generate_csrf_token
     ViewTest.tearDown(self)
Example #6
0
 def tearDown(self):
     flask_wtf.form.Form.generate_csrf_token = self.old_generate_csrf_token
     ViewTest.tearDown(self)