    def _get_name(str_or_obj):
        """Allow a string name or an object with a name attribute

        string names are used for tests where something doesn't exist
        """
        if isinstance(str_or_obj, str):
            return str_or_obj
        else:
            return str_or_obj.name
Allow a string name or an object with a name attribute

string names are used for tests where something doesn't exist
jupyterhub/tests/test_shares.py