Use byte literals instead of encode in tests (#33672)
parent
59f1a1be93
commit
b00b8ea0c1
|
@ -172,9 +172,9 @@ class TestGraphite(unittest.TestCase):
|
|||
assert sock.connect.call_count == 1
|
||||
assert sock.connect.call_args == mock.call(("foo", 123))
|
||||
assert sock.sendall.call_count == 1
|
||||
assert sock.sendall.call_args == mock.call("foo".encode("ascii"))
|
||||
assert sock.sendall.call_args == mock.call(b"foo")
|
||||
assert sock.send.call_count == 1
|
||||
assert sock.send.call_args == mock.call("\n".encode("ascii"))
|
||||
assert sock.send.call_args == mock.call(b"\n")
|
||||
assert sock.close.call_count == 1
|
||||
assert sock.close.call_args == mock.call()
|
||||
|
||||
|
|
Loading…
Reference in New Issue