From 8e4a308f0e7e6060c7f1cb5d5b73e0355c79ad8a Mon Sep 17 00:00:00 2001 From: Paul Traylor Date: Sat, 9 Jul 2011 12:04:33 -0700 Subject: [PATCH] Cleanup the hash testing script --- test/hash.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/test/hash.py b/test/hash.py index c565525..3df3cf4 100755 --- a/test/hash.py +++ b/test/hash.py @@ -1,17 +1,14 @@ -#!/usr/bin/env python -import sys -sys.path = ['..'] + sys.path -import gntp.notifier +# Test the various hashing methods +import logging +logging.basicConfig(level=logging.DEBUG) +from gntp.notifier import GrowlNotifier -class TestNotifier(gntp.notifier.GrowlNotifier): - hostname = 'shiroi' - password = 'testpassword' - notifications = ['Test'] - debug = True - -growl = TestNotifier() +growl = GrowlNotifier(notifications=['Testing'],password='password',hostname='ayu') growl.register() for hash in ['MD5','SHA1','SHA256','SHA512','fake-hash']: + print '-'*80 + print 'Testing',hash + print '-'*80 growl.passwordHash = hash - growl.notify('Test','Test Hash',hash) + growl.notify('Testing','Test Hash',hash)