def test_result_wrong_serialization(water, result_input, res_failure): res_out = Result(molecule=water, **result_input, **res_failure) assert isinstance(res_out.error, ComputeError) assert isinstance(res_out.dict(), dict) out_json = res_out.json() assert isinstance(out_json, str) assert 'its all good' in out_json
def test_result_pass_serialization(water, result_input, res_success): res_in = ResultInput(molecule=water, **result_input) assert isinstance(res_in.dict(), dict) assert isinstance(res_in.json(), str) res_out = Result(molecule=water, **result_input, **res_success) assert isinstance(res_out.dict(), dict) assert isinstance(res_out.json(), str)