def test_generate_password(self): test_profiles = Profiles("thuitafaith", "*****@*****.**", "prrr") test_profiles.save_profiles() password_changed = test_profiles.generate_password("thuitafaith", 8) self.assertTrue(len(test_profiles.password), 8)
def test_copy_password(self): test_profiles = Profiles("thuitafaith", "*****@*****.**", "prrr") test_profiles.save_profiles() test_profiles.generate_password("thuitafaith", 9) Profiles.copy_password("thuitafaith") self.assertEqual(test_profiles.password, pyperclip.paste())
def generate_password(username, password): return Profiles.generate_password(username, password)