我正在尝试为示例烧瓶应用程序编写一些单元测试.我想检查响应中是否有特定的字符串.我一直在接受TypeError: 'str' does not support the buffer interface.为什么我会收到此错误,我该如何解决?
======================================================================
ERROR: test_empty_db (__main__.FlaskrTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_flaskr.py", line 31, in test_empty_db
assert 'No entries here so far' in rv.data
TypeError: 'str' does not support the buffer interface
Run Code Online (Sandbox Code Playgroud)