File tree 3 files changed +43
-0
lines changed
3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ rst2html.py README.rst index.html
Original file line number Diff line number Diff line change
1
+ import sys , os
2
+ import unittest
3
+
4
+ sys .path .insert (0 , os .path .dirname (__file__ ))
5
+
6
+ import test_hashes
7
+
8
+ if __name__ == '__main__' :
9
+ loader = unittest .TestLoader ()
10
+ suites = [loader .loadTestsFromTestCase (test_hashes .TestHashFunctions )]
11
+ test_suite = unittest .TestSuite (suites )
12
+ unittest .TextTestRunner ().run (test_suite )
Original file line number Diff line number Diff line change
1
+ import unittest
2
+ import breinify
3
+
4
+ class TestHashFunctions (unittest .TestCase ):
5
+ def test_sign_activity (self ):
6
+ toPush = {"unixTimestamp" : 1451962516 , "activity" : {"type" : "search" }}
7
+ breinify .breinify ("abcd" , "5e9xqoesiygkuzddxjlkaq==" )._breinify__signActivity (toPush )
8
+ self .assertEqual ("rsXU0ozhfzieNLA2jQs2h2e4sz2+qHGxbgSYyfWr5EM=" , toPush ["signature" ])
9
+
10
+ def test_sign_lookup (self ):
11
+ toPush = {"unixTimestamp" : 1451962516 , "lookup" : {
12
+ "dimensions" : [
13
+ "firstname" ,
14
+ "gender" ,
15
+ "age" ,
16
+ "agegroup" ,
17
+ "digitalfootprint" ,
18
+ "images"
19
+ ]
20
+ }}
21
+ breinify .breinify ("abcd" , "5e9xqoesiygkuzddxjlkaq==" )._breinify__signLookup (toPush )
22
+ self .assertEqual ("o/LBuRFrlbZDG9OLdZRrYC2ERYqwIxdv4Dloj/GCeLQ=" , toPush ["signature" ])
23
+
24
+ def test_sign_temporal (self ):
25
+ toPush = {"unixTimestamp" : 1451962516 }
26
+ breinify .breinify ("abcd" , "5e9xqoesiygkuzddxjlkaq==" )._breinify__signTemporal (toPush )
27
+ self .assertEqual ("slh36zSa0drIQY6k5MdhhRd/y8nly0jl7gGlVmhVWE8=" , toPush ["signature" ])
28
+
29
+ if __name__ == '__main__' :
30
+ unittest .main ()
You can’t perform that action at this time.
0 commit comments