def test_gen_password_copy(self): ''' test_gen_password_copy to test if password generated is copied to clipboard. ''' print(" ") print("Copy system password to clipboard test") print("-" * 40) self.assertEqual(Password.gen_password(), pyperclip.paste())
def test_gen_password(self): ''' test_gen_password method to test if password of inputted length is generated. ''' print(" ") print("Generate system password test. Use any inputs.") print("-" * 40) pass_length = int(input("Test sys password length (at least 5): ")) self.assertEqual(len(Password.gen_password()), pass_length)