'Test the group_branches function.'

def test_should_return_a_valid_dict_on_group_branches(self):

    branches = [u'top_1/child_1/child_1_1', u'top_1/child_1/child_1_2', u'top_1/child_2/child_2_1/child_2_1_1', u'top_1/child_2/child_2_1/child_2_1_2']
    tree_helper = BranchesTreeHelper()
    result = tree_helper.group_branches(branches, u'/')
    self.assertEqual({u'top_1': {u'child_1': {u'child_1_2': {}, u'child_1_1': {}}, u'child_2': {u'child_2_1': {u'child_2_1_2': {}, u'child_2_1_1': {}}}}}, result)
