This commit is contained in:
Austin Papp 2019-03-27 15:52:37 -04:00 committed by Daniel Wozniak
parent be94d6ad2e
commit df02e9aa1e

View file

@ -64,9 +64,11 @@ class RunnerReturnsTest(ShellCase):
**data["return"]["kwargs"]
)
# Pop off the timestamp (do not provide a 2nd argument, if the stamp is
# missing we want to know!)
data.pop("_stamp")
# Pop off dynamic keys in the return schema that are impossible to test.
# Do not supply the default arguments because we want to know if we are
# missing some aspect of the schema.
data.pop('_stamp')
data.pop('pid')
def write_conf(self, data):
"""
@ -113,8 +115,8 @@ class RunnerReturnsTest(ShellCase):
"return.p",
)
serial = salt.payload.Serial(self.master_opts)
with salt.utils.files.fopen(serialized_return, "rb") as fp_:
deserialized = serial.loads(fp_.read())
with salt.utils.files.fopen(serialized_return, 'rb') as fp_:
deserialized = serial.loads(fp_.read(), encoding='utf-8')
self.clean_return(deserialized["return"])