3
테스트를 실행할 때 다음 추적을 얻고 있습니다.플라스크 테스트 신호가 지원되지 않음 오류
in get_context_variable
raise RuntimeError("Signals not supported")
RuntimeError: Signals not supported
__init__.py
from flask_testing import TestCase
from app import create_app, db
class BaseTest(TestCase):
BASE_URL = 'http://localhost:5000/'
def create_app(self):
return create_app('testing')
def setUp(self):
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_all()
def test_setup(self):
response = self.client.get(self.BASE_URL)
self.assertEqual(response.status_code, 200)
test_routes.py 오류에서 오는 곳 get_context_variable
함수 호출이 나타납니다
from . import BaseTest
class TestMain(BaseTest):
def test_empty_index(self):
r = self.client.get('/')
self.assert200(r)
self.assertEqual(self.get_context_variable('partners'), None)
. 또한 시도하고 사용하면 assert_template_used
이 오류가 나타납니다. 이것에 대한 해결책을 찾는 데 다소 어려움을 겪습니다.