Skip to content

Commit

Permalink
fix: 修改202返回不抛出错误堆栈 (#36)
Browse files Browse the repository at this point in the history
* fix: 修改202返回不抛出错误堆栈

* fix: 修改单测的问题

Co-authored-by: veehou <veehou@tencent.com>
  • Loading branch information
hwygithub and veehou committed Mar 11, 2022
1 parent a6773ce commit 98b7d15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion qqbot/core/network/async_http.py
Expand Up @@ -37,7 +37,7 @@ def __init__(self, data=None):

class HttpStatus:
OK = 200
ACCEPTED = 200
ACCEPTED = 202
NO_CONTENT = 204


Expand Down
9 changes: 3 additions & 6 deletions tests/test_api.py
Expand Up @@ -10,10 +10,7 @@
ServerError,
)
from qqbot.core.util import logging
from qqbot.model.announce import (
RecommendChannel,
RecommendChannelRequest
)
from qqbot.model.announce import RecommendChannel, RecommendChannelRequest
from qqbot.model.api_permission import (
PermissionDemandToCreate,
APIPermissionDemandIdentify,
Expand Down Expand Up @@ -124,8 +121,8 @@ def test_create_update_delete_channel(self):
api_patch_channel = self.api.update_channel(channel.id, patch_channel)
self.assertEqual("update_channel", api_patch_channel.name)
# delete
delete_channel = self.api.delete_channel(channel.id)
self.assertEqual("update_channel", delete_channel.name)
self.api.delete_channel(channel.id)
# self.assertEqual("update_channel", delete_channel.name)


class ChannelPermissionsTestCase(unittest.TestCase):
Expand Down

0 comments on commit 98b7d15

Please sign in to comment.