Use byte literals instead of encode in tests (#33672)

pull/33681/head
Franck Nijhof 2020-04-05 02:39:44 +02:00 committed by GitHub
parent 59f1a1be93
commit b00b8ea0c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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()