Skip to content
Snippets Groups Projects
Commit aedb6871 authored by Radko Krkoš's avatar Radko Krkoš
Browse files

Server/Tests: Make ReadableSTR.read() understand the length parameter

parent 32cd9b22
No related branches found
No related tags found
No related merge requests found
......@@ -68,9 +68,9 @@ def tearDownModule(): # pylint: disable = locally-disabled, invalid-name
class ReadableSTR(str):
"""Mission: To boldly quack like a buffer, like no str has quacked before"""
def read(self, content_length=0): # pylint: disable = locally-disabled, unused-argument
def read(self, content_length=None):
"""Return own content"""
return self
return self[0:content_length]
if getattr(str, 'decode', None) is None:
def decode(self, encoding="UTF-8", errors="strict"): # pylint: disable = locally-disabled, unused-argument
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment