def test_find_credentials(self): """ Test to see if a user can search for a specific account in the application """ self.new_user_credentials.save_existing_acc() test_account = Credentials('Facebook', 'diella', 'diella26') test_account.save_existing_acc() found_account = Credentials.find_by_username('diella') self.assertEqual(found_account.acc_name, test_account.acc_name)
def find_account(username): """ a method funtion for the user to search for a specific account using its username. """ return Credentials.find_by_username(username)