security_test.py 646 Bytes
Newer Older
Romain Bignon's avatar
Romain Bignon committed
1
from assnet import security
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

from unittest import TestCase


class SecurityTest(TestCase):
    def test_random(self):
        assert len(security.random(42)) > len(security.random(41))
        assert len(security.armored_random(42)) > \
            len(security.armored_random(41))

        # check if it is not the end of the world
        assert security.armored_random(42) != \
            security.armored_random(42) != \
            security.armored_random(42) != \
            security.armored_random(42) != \
            security.armored_random(42) != \
            security.armored_random(42) != \
            security.armored_random(42)