def test_client(config, options): logging.basicConfig(level=options.verbose) notifier = GrowlNotifier(hostname=config.get('regrowl.server', 'hostname', '127.0.0.1'), port=config.getint('regrowl.server', 'port'), password=config.get('regrowl.server', 'password'), notifications=['Test']) if options.test in ['registration', 'all']: notifier.register() if options.test in ['notification', 'all']: notifier.notify( noteType='Test', title='Testing', description='ReGrowl Test', ) if options.test in ['subscription', 'all']: notifier.subscribe( 'TestId', 'TestName', 1337, )
def test_client(config, options): logging.basicConfig(level=options.verbose) notifier = GrowlNotifier( hostname=config.get('regrowl.server', 'hostname', '127.0.0.1'), port=config.getint('regrowl.server', 'port'), password=config.get('regrowl.server', 'password'), notifications=['Test'] ) if options.test in ['registration', 'all']: notifier.register() if options.test in ['notification', 'all']: notifier.notify( noteType='Test', title='Testing', description='ReGrowl Test', ) if options.test in ['subscription', 'all']: notifier.subscribe( 'TestId', 'TestName', 1337, )
########NEW FILE######## __FILENAME__ = attributes #!/usr/bin/env python # Simple manual test to make sure that attributes do not # accumulate in the base classes # https://github.com/kfdm/gntp/issues/10 import gntp import gntp.notifier a = gntp.notifier.GrowlNotifier(notifications=['A']) b = gntp.notifier.GrowlNotifier(notifications=['B']) a.notify('A','A','A',sticky=True) b.notify('B','B','B') ########NEW FILE######## __FILENAME__ = subscribe # -*- coding: utf-8 -*- # Simple script to test sending UTF8 text with the GrowlNotifier class import logging logging.basicConfig(level=logging.DEBUG) from gntp.notifier import GrowlNotifier import platform growl = GrowlNotifier(notifications=['Testing'],password='******',hostname='ayu') growl.subscribe(platform.node(),platform.node(),12345) ########NEW FILE########
# -*- coding: utf-8 -*- # Simple script to test sending UTF8 text with the GrowlNotifier class import logging logging.basicConfig(level=logging.DEBUG) from gntp.notifier import GrowlNotifier import platform growl = GrowlNotifier(notifications=['Testing'],password='******',hostname='ayu') growl.subscribe(platform.node(),platform.node(),12345)