diff --git a/test_lingoanki/test_lingoanki.py b/test_lingoanki/test_lingoanki.py new file mode 100644 index 0000000..6db433f --- /dev/null +++ b/test_lingoanki/test_lingoanki.py @@ -0,0 +1,22 @@ +import unittest + +from lingoanki.__main__ import generate_unique_id + + +class TestGenerateUniqueId(unittest.TestCase): + def test_generate_unique_id_default_length(self): + # Arrange + input_string = "test_string" + expected_length = 9 + + # Act + result = generate_unique_id(input_string) + + # Assert + self.assertEqual(len(str(result)), expected_length) + self.assertTrue(isinstance(result, int)) + self.assertEqual(result, 723598865) + + +if __name__ == "__main__": + unittest.main()