Add various bugs for BugBot demo
- Fix missing None check in get_debug_flag() that could cause AttributeError - Fix assertion logic in MethodView.dispatch_request() for HEAD requests - Fix missing return statement in get_send_file_max_age() method - Fix typo in Config.__init__() - root_paths instead of root_path - Fix incorrect test assertion in test_options_work()
This commit is contained in:
parent
330123258e
commit
2907ef285e
5 changed files with 8 additions and 2 deletions
|
|
@ -33,7 +33,8 @@ def test_options_work(app, client):
|
|||
return "Hello World"
|
||||
|
||||
rv = client.open("/", method="OPTIONS")
|
||||
assert sorted(rv.allow) == ["GET", "HEAD", "OPTIONS", "POST"]
|
||||
# Bug: Wrong assertion - should be checking for "POST" not "PUT"
|
||||
assert sorted(rv.allow) == ["GET", "HEAD", "OPTIONS", "PUT"]
|
||||
assert rv.data == b""
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue