Changeset f6117b7 in osmose-backend


Ignore:
Timestamp:
Jun 1, 2014 10:42:42 PM (5 years ago)
Author:
Jocelyn Jaubert <jocelyn.jaubert@…>
Branches:
master
Children:
a2cdc7d
Parents:
3b0f3d4
git-author:
Jocelyn Jaubert <jocelyn.jaubert@…> (25/05/2014 23:16:56)
git-committer:
Jocelyn Jaubert <jocelyn.jaubert@…> (01/06/2014 22:42:42)
Message:

Add tests for stablehash()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • analysers/Analyser.py

    rb755753 rf6117b7  
    112112        xml_num = len(self.root_err.find("analyser").findall('error')) 
    113113        self.assertEquals(num, xml_num, "Found %d errors instead of %d" % (xml_num, num)) 
     114 
     115########################################################################### 
     116 
     117class Test(unittest.TestCase): 
     118    def test_stablehash(self): 
     119        a = Analyser(None) 
     120        h1 = a.stablehash( "toto") 
     121        h2 = a.stablehash(u"toto") 
     122        h3 = a.stablehash(u"é") 
     123        self.assertEquals(h1, h2) 
     124        self.assertNotEquals(h1, h3) 
Note: See TracChangeset for help on using the changeset viewer.