slinky/tests/test_slinky.py
2021-12-19 11:51:15 +00:00

17 lines
497 B
Python

from unittest import TestCase
import slinky
class TestSlinky(TestCase):
def test_random_string(self) -> None:
"""
Ensure the random string generates correctly
"""
self.assertEqual(4, len(slinky.random_string()))
self.assertEqual(8, len(slinky.random_string(8)))
self.assertEqual(16, len(slinky.random_string(16)))
self.assertEqual(64, len(slinky.random_string(64)))
self.assertTrue(slinky.random_string(128).isalnum(), True)