py.test to test flask register, AssertionError: Popped wrong request context

后端 未结 4 869
闹比i
闹比i 2021-01-01 15:05

I\'m using flask to do register and login:

from flask.ext.security.views import register, login

class Register(Resource):
    def post(self):
        return         


        
4条回答
  •  鱼传尺愫
    2021-01-01 15:48

    It's a known flask problem. You receive two exceptions instead one. Simply add PRESERVE_CONTEXT_ON_EXCEPTION = False to your test config.

提交回复
热议问题