def test_splitting_exchanges(self): db = [{ "name": "foo", "exchanges": [ { "name": "Absorption chiller 100kW/CH/I U" }, { "name": "Cheese/CH" }, ], }] result = [{ "name": "foo", "exchanges": [ { "name": "Absorption chiller 100kW", "location": "CH", "simapro name": "Absorption chiller 100kW/CH/I U", }, { "name": "Cheese/CH" }, ], }] self.assertEqual(split_simapro_name_geo(db), result)
def test_splitting_datasets(self): db = [ {"name": "Absorption chiller 100kW/CH/I U"}, {"name": "Cheese/CH"}, ] result = [ { "name": "Absorption chiller 100kW", "location": "CH", "reference product": "Absorption chiller 100kW", "simapro name": "Absorption chiller 100kW/CH/I U", }, {"name": "Cheese/CH"}, ] self.assertEqual(split_simapro_name_geo(db), result)
def test_splitting_datasets(self): db = [ {'name': 'Absorption chiller 100kW/CH/I U'}, {'name': 'Cheese/CH'}, ] result = [ { 'name': 'Absorption chiller 100kW', 'location': 'CH', 'reference product': 'Absorption chiller 100kW', 'simapro name': 'Absorption chiller 100kW/CH/I U', }, {'name': 'Cheese/CH'}, ] self.assertEqual(split_simapro_name_geo(db), result)
def test_splitting_exchanges(self): db = [{ 'name': 'foo', 'exchanges': [{ 'name': 'Absorption chiller 100kW/CH/I U' }, { 'name': 'Cheese/CH' }], }] result = [{ 'name': 'foo', 'exchanges': [{ 'name': 'Absorption chiller 100kW', 'location': 'CH', 'simapro name': 'Absorption chiller 100kW/CH/I U', }, { 'name': 'Cheese/CH' }], }] self.assertEqual(split_simapro_name_geo(db), result)