Exemplo n.º 1
0
    def test_password_autogenerate(self):

        # test method to test auto generation of passwords

        self.new_account.save_account()
        another_account = Credentials("Blog", "Ger")
        another_account.save_account()
Exemplo n.º 2
0
    def test_dislay_accounts(self):

        # test method for displaying  accounts

        self.new_account.save_account()
        another_account = Credentials("Gscroll", "Edward", "Young-Tad")
        another_account.save_account()
        self.assertEqual(Credentials.display_accounts(),
                         Credentials.usercredential)
Exemplo n.º 3
0
 def test_delete_account(self):
     '''
     test method to check if an account has been deleted
     '''
     self.new_account.save_account()
     another_account = Credentials("LinkedIn", "Sam", "Yayers")
     another_account.save_account()
     self.new_account.delete_account()
     self.assertEqual(len(Credentials.usercredential), 1)
Exemplo n.º 4
0
 def test_save_multiple(self):
     '''
     test method to check if user can add many accounts
     '''
     self.new_account.save_account()
     another_account = Credentials("Instagram", "Robert", "Alai1234")
     another_account.save_account()
     self.assertEqual(len(Credentials.usercredential),
                      2)  # We should have two of them
Exemplo n.º 5
0
 def test_search_accounts(self):
     '''
     test method to test search functionality
     '''
     self.new_account.save_account()
     another_account = Credentials("Facebook", "Kevin", "Stano1234")
     another_account.save_account()
     self.assertEqual(another_account,
                      Credentials.search_accounts("Facebook"))
Exemplo n.º 6
0
 def setUp(self):
     '''
     method run before each test.  Gives the cutting guideline 
     '''
     self.new_account = Credentials("Twitter", "cyprian", "MyPassword")
Exemplo n.º 7
0
def create_account(account, u_name, passwd):

    # function to create a new account

    new_account = Credentials(account, u_name, passwd)
    return new_account