Fix conversion to bytes in Python3 in tests.

This commit is contained in:
Jan Kaluza
2019-03-12 14:47:44 +01:00
committed by mprahl
parent 9778812ab5
commit 57d5548105

View File

@@ -296,7 +296,7 @@ class TestBuild:
rpm_artifacts = mmd.get_rpm_artifacts()
rpm_artifacts.add("dhcp-libs-12:4.3.5-5.module_2118aef6.x86_64")
mmd.set_rpm_artifacts(rpm_artifacts)
mmd_data = bytes(mmd.dumps())
mmd_data = to_text_type(mmd.dumps()).encode("utf-8")
patched_open.return_value = mock_open(
read_data=mmd_data).return_value