def test_str2dict(self): string = "key1=value1,key2=value2,key3=value3" expected = {"key1": "value1", "key2": "value2", "key3": "value3"} self.assertEqual(utils.str2dict(string), expected)
def test_str2dict(self): string = "key1=value1,key2=value2,key3=value3" expected = {"key1": "value1", "key2": "value2", "key3": "value3"} self.assertEqual(expected, utils.str2dict(string))
def test_dict_str_conversion(self): dic = {"key1": "value1", "key2": "value2"} self.assertEqual(utils.str2dict(utils.dict2str(dic)), dic)
def test_dict_str_conversion(self): dic = {"key1": "value1", "key2": "value2"} self.assertEqual(dic, utils.str2dict(utils.dict2str(dic)))