mirror of
https://github.com/logos-blockchain/logos-blockchain-specs.git
synced 2026-05-02 07:23:32 +00:00
22 lines
480 B
Python
22 lines
480 B
Python
|
|
"""
|
||
|
|
This module tests that all the hacks we introduced in our crypto mocks give us
|
||
|
|
the basic behaviour that we need.
|
||
|
|
"""
|
||
|
|
|
||
|
|
from unittest import TestCase
|
||
|
|
|
||
|
|
|
||
|
|
from crypto import hash_to_curve, Field
|
||
|
|
|
||
|
|
|
||
|
|
class TestCrypto(TestCase):
|
||
|
|
def test_hash_to_curve(self):
|
||
|
|
p1 = hash_to_curve(Field(0), Field(1), Field(2))
|
||
|
|
p2 = hash_to_curve(Field(0), Field(1), Field(2))
|
||
|
|
|
||
|
|
assert p1 == p2
|
||
|
|
|
||
|
|
p3 = hash_to_curve(Field(0), Field(1), Field(3))
|
||
|
|
|
||
|
|
assert p1 != p3
|