тест падает не може подсказать что не так?
client = <FlaskClient <Flask 'app'>>
def test_page_urls(client):
# Visit home page
> response = client.get(url_for('public.home_page'), follow_redirects=True)
tests/test_page_urls.py:7:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../env/lib/python3.8/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../env/lib/python3.8/site-packages/flask/testing.py:124: in open
return Client.open(self, builder,
../env/lib/python3.8/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../env/lib/python3.8/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../env/lib/python3.8/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../env/lib/python3.8/site-packages/flask/app.py:1994: in __call__
return self.wsgi_app(environ, start_response)
../env/lib/python3.8/site-packages/flask/app.py:1985: in wsgi_app
response = self.handle_exception(e)
../env/lib/python3.8/site-packages/flask/app.py:1540: in handle_exception
reraise(exc_type, exc_value, tb)
../env/lib/python3.8/site-packages/flask/_compat.py:33: in reraise
raise value
../env/lib/python3.8/site-packages/flask/app.py:1982: in wsgi_app
response = self.full_dispatch_request()
../env/lib/python3.8/site-packages/flask/app.py:1614: in full_dispatch_request
rv = self.handle_user_exception(e)
../env/lib/python3.8/site-packages/flask/app.py:1517: in handle_user_exception
reraise(exc_type, exc_value, tb)
../env/lib/python3.8/site-packages/flask/_compat.py:33: in reraise
raise value
../env/lib/python3.8/site-packages/flask/app.py:1610: in full_dispatch_request
rv = self.preprocess_request()
../env/lib/python3.8/site-packages/flask/app.py:1831: in preprocess_request
rv = func()
app/views/members_views.py:31: in before_request
set_lang(lang)
app/views/members_views.py:23: in set_lang
tr.install(True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gettext.GNUTranslations object at 0x7f0b7133f280>, names = True
def install(self, names=None):
import builtins
builtins.__dict__['_'] = self.gettext
if names is not None:
allowed = {'gettext', 'lgettext', 'lngettext',
'ngettext', 'npgettext', 'pgettext'}
> for name in allowed & set(names):
E TypeError: 'bool' object is not iterable
/usr/lib/python3.8/gettext.py:352: TypeError
пастебины отменили?
You have ReadOnly access for 9 minutes. By reason: Читай правила чата. А именно пункт 1.2 (gist)
Обсуждают сегодня