Tests: assertion related fixes.

This commit is contained in:
Andrei Zeliankou
2023-05-25 16:56:14 +01:00
parent 0132e552d0
commit b034bf6703
11 changed files with 90 additions and 95 deletions

View File

@@ -28,10 +28,10 @@ class TestNodeWebsockets(TestApplicationNode):
self.check_close(sock)
def check_close(self, sock, code=1000, no_close=False, frame=None):
if frame == None:
if frame is None:
frame = self.ws.frame_read(sock)
assert frame['fin'] == True, 'close fin'
assert frame['fin'], 'close fin'
assert frame['opcode'] == self.ws.OP_CLOSE, 'close opcode'
assert frame['code'] == code, 'close code'