from apel.common import calculate_hash
from unittest import TestCase
import tempfile
import os

class HashingTest(TestCase):
    '''
    Test case for calculate_hash method.
    '''
    
    def test_calculate_hash(self):
        
        data = '01010101' * 200
        data_hash = '3d1eb00cc63828b36882f076f35c8cdd'
        
        tmpname = tempfile.mktemp('hashtest')
        fp = open(tmpname, 'w')
        fp.write(data)
        fp.close()
        
        self.assertEqual(data_hash, calculate_hash(tmpname))
        
        os.unlink(tmpname)


@@ -175,21 +175,17 @@
     '''%0A
-    
 %0A
+
     def 
@@ -211,25 +211,17 @@
 (self):%0A
-        
 %0A
+
         
@@ -299,25 +299,17 @@
 5c8cdd'%0A
-        
 %0A
+
         
@@ -420,25 +420,17 @@
 close()%0A
-        
 %0A
+
         
@@ -482,24 +482,16 @@
 pname))%0A
-        
 %0A       

Remove trailing whitespace from test/test_hashing.py