def test_get_dim_label_with_index(self): """ Test pyjstat get_dim_label() using id as parameter """ dim = self.oecd_datasets['oecd']['dimension']['id'][2] dims_df = pyjstat.get_dim_label(self.oecd_datasets['oecd'], dim) self.assertTrue(dims_df.iloc[0]['id'] == '2003') self.assertTrue(dims_df.iloc[-1]['label'] == '2014')
def test_get_dim_label_with_label(self): """ Test pyjstat get_dim_label() using label as parameter """ dim = self.oecd_datasets['oecd']['dimension']['id'][0] dims_df = pyjstat.get_dim_label(self.oecd_datasets['oecd'], dim) self.assertTrue(dims_df.iloc[0]['id'] == 'UNR') self.assertTrue(dims_df.iloc[-1]['label'] == 'Unemployment rate')
def test_get_dim_label_with_index(self): """ Test pyjstat get_dim_label() using id as parameter """ dim = self.oecd_datasets["oecd"]["dimension"]["id"][2] dims_df = pyjstat.get_dim_label(self.oecd_datasets["oecd"], dim) self.assertTrue(dims_df.iloc[0]["id"] == "2003") self.assertTrue(dims_df.iloc[-1]["label"] == "2014")
def test_get_dim_label_with_label(self): """ Test pyjstat get_dim_label() using label as parameter """ dim = self.oecd_datasets["oecd"]["dimension"]["id"][0] dims_df = pyjstat.get_dim_label(self.oecd_datasets["oecd"], dim) self.assertTrue(dims_df.iloc[0]["id"] == "UNR") self.assertTrue(dims_df.iloc[-1]["label"] == "unemployment rate")
def test_get_dim_label_with_label(self): """ Test pyjstat get_dim_label() using label as parameter """ dim = self.oecd_datasets['oecd']['dimension']['id'][0] dims_df = pyjstat.get_dim_label(self.oecd_datasets['oecd'], dim) self.assertTrue(dims_df.iloc[0]['id'] == 'UNR') self.assertTrue(dims_df.iloc[-1]['label'] == 'unemployment rate')