def test_should_return_empty_state_on_save_state(self): """Test the save_state function.""" top = _create_item('top', False) tree_helper = BranchesTreeHelper() result = tree_helper.save_state(top) self.assertEqual({'top': {}}, result)
def test_should_return_a_valid_state_on_save_state(self): """Test the save_state function.""" items = _create_top_item() tree_helper = BranchesTreeHelper() result = tree_helper.save_state(items['top']) self.assertEqual({'top': {'child_1': {}, 'child_2': { 'sub_child_2_1': {}, 'sub_child_2_2': {}}}}, result)
def test_should_return_a_valid_state_on_save_state(self): """Test the save_state function.""" items = self._create_top_item() tree_helper = BranchesTreeHelper() result = tree_helper.save_state(items['top']) self.assertEqual({'top': {'child_1': {}, 'child_2': { 'sub_child_2_1': {}, 'sub_child_2_2': {}}}}, result)