Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

Commit

Permalink
Cleanup the hash testing script
Browse files Browse the repository at this point in the history
  • Loading branch information
kfdm committed Jul 9, 2011
1 parent d27faf0 commit 8e4a308
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions 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)

0 comments on commit 8e4a308

Please sign in to comment.