def test_merge_two_structs_complex(self): self.assertEqual( merge_two_structs({'a': {'b': {'c': ['d', 'e', {'f': 'g'}]}}}, {'a': {'b': {'c': ['h', 'i']}}}), {'a': {'b': {'c': ['d', 'e', {'f': 'g'}, 'h', 'i']}}})
def test_merge_two_structs_dicts_samekeys(self): self.assertEqual( merge_two_structs({'a': '1'}, {'a': '2'}), {'a': '2'})
def test_merge_two_structs_dicts_differentkeys(self): self.assertEqual( merge_two_structs({'a': '1'}, {'b': '2'}), {'a': '1', 'b': '2'})
def test_merge_two_structs_lists_in_dict(self): self.assertEqual( merge_two_structs({'a': ['b']}, {'a': ['c']}), {'a': ['b', 'c']})
def test_merge_two_structs_lists(self): self.assertEqual( merge_two_structs(['1'], ['2']), ['1', '2'])
def test_merge_two_structs_simple(self): self.assertEqual( merge_two_structs('1', '2'), '2')