Exemplo n.º 1
0
 def test_checksum(self):
     k = [u'Field1',u'Field2',u'Field3']
     v = [u'Value1',u'Value2',u'Value3']
     cs = "%x" % zlib.crc32( repr(zip(k,v)) )
     k = k[::-1]
     v = v[::-1]
     assert cs == Model._checksum( dict(zip(k,v)) )
Exemplo n.º 2
0
 def test_field_checksum(self):
     k = [u'Field1',u'Field2',u'Field3']
     cs = "%x" % zlib.crc32( repr(k) )
     k = k[::-1]
     assert cs == Model._field_checksum(k)