def test_get_coverage(mocker): mocker.patch("gs_quant.api.gs.data.GsDataApi.get_coverage", return_value=test_coverage_data) mocker.patch("gs_quant.api.gs.data.GsDataApi.get_types", return_value={'gsid': 'string'}) data = Dataset(Dataset.TR.TREOD).get_coverage() assert data.equals( GsDataApi.construct_dataframe_with_types(str(Dataset.TR.TREOD), test_coverage_data))
def test_get_coverage(get_coverage, get_types): get_coverage.return_value = test_coverage_data get_types.return_value = {'gsid': 'string'} data = Dataset(Dataset.TR.TREOD).get_coverage() assert data.equals(construct_dataframe_with_types(str(Dataset.TR.TREOD), test_coverage_data))