def publish(self):

        if _is_loopback_address(self.host):
            logger.debug(
                '%s: Publish on loopback interface is not supported.', self)
            return False

        if not dbus:
            logger.debug('%s: dbus not installed; publish failed.', self)
            return False

        if not self.bus:
            logger.debug('%s: Bus not available; publish failed.', self)
            return False

        if not self.server:
            logger.debug('%s: Server not available; publish failed.', self)
            return False

        try:
            if not self.bus.name_has_owner('org.freedesktop.Avahi'):
                logger.debug(
                    '%s: Avahi service not running; publish failed.', self)
                return False

            self.group = dbus.Interface(
                self.bus.get_object(
                    'org.freedesktop.Avahi', self.server.EntryGroupNew()),
                'org.freedesktop.Avahi.EntryGroup')

            self.group.AddService(
                _AVAHI_IF_UNSPEC, _AVAHI_PROTO_UNSPEC,
                dbus.UInt32(_AVAHI_PUBLISHFLAGS_NONE),
                self.name, self.stype,
                self.domain, self.host, dbus.UInt16(self.port),
                _convert_text_list_to_dbus_format(self.text))

            self.group.Commit()
            logger.debug('%s: Published', self)
            return True
        except dbus.exceptions.DBusException as e:
            logger.debug('%s: Publish failed: %s', self, e)
            return False
Should succeed when the call to authenticate_with_google succeeds.
dataset/ETHPy150Open mopidy/mopidy/mopidy/zeroconf.py/Zeroconf.publish--crossover with--dataset/ETHPy150Open m-lab/telescope/tests/test_external.py/GetAuthenticatedServiceTest.test_get_authenticated_service_success