def test_taxonomy_process_prefs(self): """taxonomy_process_prefs should return a taxonomy prefs file""" taxonomy_levels = [2,3,4] exp1={} exp1['level_2']={'column':'2'} exp1['level_3']={'column':3, 'colors':{'a':('red',(0, 100, 100))}} obs1=taxonomy_process_prefs(taxonomy_levels,exp1) exp2={} exp2['2']={'column':'2', 'colors':{}} exp2['3']={'column':'3', 'colors':{'a':('red',(0, 100, 100))}} exp2['4'] = {'column':'4','colors':{}} self.assertEqual(obs1,exp2)
def test_taxonomy_process_prefs(self): """taxonomy_process_prefs should return a taxonomy prefs file""" taxonomy_levels = [2, 3, 4] exp1 = {} exp1["level_2"] = {"column": "2"} exp1["level_3"] = {"column": 3, "colors": {"a": ("red", (0, 100, 100))}} obs1 = taxonomy_process_prefs(taxonomy_levels, exp1) exp2 = {} exp2["2"] = {"column": "2", "colors": {}} exp2["3"] = {"column": "3", "colors": {"a": ("red", (0, 100, 100))}} exp2["4"] = {"column": "4", "colors": {}} self.assertEqual(obs1, exp2)