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)