from Products.testing import dummy

def getGetTeams(return_team=True, return_membership=True):
    def getTeams():
        if return_team:
            return []
        mship=None
        if return_team:
            mship = dummy({}, name='mship')
        rmship=lambda self, mid, active_only=False: mship
        return [dummy(dict(getMembershipByMemberId=rmship),
                      name='Team')]
    return getTeams

