示例#1
0
    def test_account_exists(self):

        self.new_account.save_user_details()
        test_newaccount = UserAccount("Gmail", "User", "Password")
        test_newaccount.save_user_details()
        account_exists = UserAccount.check_user_account("Gmail")
        self.assertTrue(account_exists)
示例#2
0
    def test_delete_user_account(self):

        self.new_account.save_user_details()
        test_newaccount = UserAccount("Gmail", "User", "Password")
        test_newaccount = save_user_details()
        self.new_account.delete_user_details()
        self.assertEqual(len(UserAccount.user_pass_list), 1)
示例#3
0
 def setUp(self):
     self.new_account = UserAccount("Gmail", "*****@*****.**",
                                    "password123")
示例#4
0
 def test_search_user_account(self):
     self.new_account.save_user_details()
     test_newaccount = UserAccount("Gmail", "User", "Password")
     test_newaccount = save_user_details()
     search_user = UserAccount.search_user_account("Facebook")
     self.assertEqual(search_user.account, test_newaccount.account)
示例#5
0
    def test_saving_multiple_accounts(self):

        self.new_account.save_user_details()
        test_newaccount = UserAccount("Gmail", "User", "Password")
        test_newaccount.save_user_details()
        self.assertEqual(len(UserAccount.user_pass_list), 2)
示例#6
0
def create_user_details(account,email,password):

    new_account = UserAccount(account,email,password)
    return new_account