def test_invalid_optim_request(self): req_json = json.loads( open("./test/optengine-tests/test_optengine_invalid.json").read()) with pytest.raises(DataError): validate_request(req_json)
def test_invalid_optim_request_no_optdata(self): req_json = json.loads( open("./test/optengine-tests/test_optengine_no_optdata.json").read( )) with pytest.raises(BusinessException): validate_request(req_json)
def test_valid_optim_request(self): req_json = json.loads( open("./test/optengine-tests/test_optengine_valid.json").read()) assert validate_request(req_json) == True