Esempio n. 1
0
 def test_delete_account(self):
     '''
         test_delete_account to test if we can remove a account from our accountlist
         '''
     self.new_account.save_account()
     test_account = account("facebook", "4321")  # new account
     test_account.save_account()
     self.new_account.delete_account()  # Deleting a account object
     self.assertEqual(len(account.account_list), 1)
Esempio n. 2
0
 def test_save_multiple_account(self):
     '''
         test_save_multiple_account to check if we can save multiple account
         objects to our account_list
         '''
     self.new_account.save_account()
     test_account = account("instagram", "4321")  # new credential
     test_account.save_account()
     self.assertEqual(len(account.account_list), 2)
Esempio n. 3
0
    def test_find_account_by_name(self):
        '''
        test to check if we can find an account by name
        '''

        self.new_account.save_account()
        test_account = account("snapchat", "paswa")  # new account
        test_account.save_account()

        found_account = account.find_by_name("snapchat")

        self.assertEqual(found_account.account_name, test_account.account_name)
Esempio n. 4
0
    def test_account_exists(self):
        '''
        test to check if we can return a Boolean  if we cannot find the account.
        '''

        self.new_account.save_account()
        test_account = account(
            "Test",
            "3344",
        )  # new account
        test_account.save_account()

        account_exists = account.account_exist("Test")

        self.assertTrue(account_exists)
Esempio n. 5
0
def create_account(account_name, password):
    '''
    Function to create a new account
    '''
    new_account = account(account_name, password)
    return new_account
Esempio n. 6
0
 def setUp(self):
     '''
     Set up method to run before each test cases.
     '''
     self.new_account = account("twitter",
                                "1234")  # create credentila  object