From 54ed36c02ac158f5b76c57ad71dae978d67a20e8 Mon Sep 17 00:00:00 2001 From: Nikolay Kushin Date: Mon, 18 Nov 2019 12:00:10 +0100 Subject: [PATCH] Add ability to request regions with synonyms from IXMP web API - uncomment test --- tests/test_iiasa.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/test_iiasa.py b/tests/test_iiasa.py index ec9852fd7..9cb13ebbe 100644 --- a/tests/test_iiasa.py +++ b/tests/test_iiasa.py @@ -76,11 +76,13 @@ def test_regions(): obs = conn.regions().values assert 'World' in obs -# API changes to return synonyms not yet deployed to SR15 -# def test_regions_with_synonyms(): -# conn = iiasa.Connection('IXSE_SR15') -# obs = conn.regions(include_synonyms=True) -# assert 'World' in obs + +def test_regions_with_synonyms(): + conn = iiasa.Connection('IXSE_SR15') + obs = conn.regions(include_synonyms=True) + assert 'synonym_0' in obs.columns + assert (obs[obs.region == 'R5ROWO'] + .synonym_0 == 'Rest of the World (R5)').all() def test_metadata():