1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-31 10:24:13 +02:00

Fix Python 3 support.

This change fixes errors when running test suite with Python 3.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
This commit is contained in:
Oleg Girko
2015-08-13 12:40:16 +01:00
parent c23e20bc29
commit 4d3fcd9dc1
3 changed files with 9 additions and 4 deletions

View File

@@ -92,7 +92,7 @@ class MyHTTPHandler(HTTPHandler):
elif exp is None:
raise RuntimeError('exp or expfile required')
if exp is not None:
if req.get_data() != bytes(exp, "utf-8"):
if req.data != bytes(exp, "utf-8"):
raise RequestDataMismatch(req.get_full_url(), repr(req.get_data()), repr(exp))
return self.__get_response(req.get_full_url(), **kwargs)