Exemplo n.º 1
0
 def test_find_by_site_name(self): 
     '''
     Test to check if the find_by_site_name method returns the correct credential
     '''
     self.new_credential.save_credentials()
     twitter = Credential('Mary','Twitter','Jacintaatek','pswd540')
     twitter.save_credentials()
     credential_exists = Credential.find_by_site_name('Twitter')
     self.assertEqual(credential_exists,twitter)
Exemplo n.º 2
0
    def test_find_by_site_name(self):
        '''
		Test to check if the find_by_site_name method returns the correct credential
		'''
        self.new_credential.save_credentials()
        twitter = Credential('Tony', 'Twitter', 'tonkin', 'tnkz000')
        twitter.save_credentials()
        credential_exists = Credential.find_by_site_name('Twitter')
        self.assertEqual(credential_exists, twitter)
Exemplo n.º 3
0
 def test_find_by_site_name(self):
     """
     Test to check if the find_by_site_name method returns the correct credential
     """
     self.new_credential.save_credentials()
     twitter = Credential('Njoroge', 'Twitter', 'Njoroge_Chosen', 'boo98')
     twitter.save_credentials()
     credential_exists = Credential.find_by_site_name('Twitter')
     self.assertEqual(credential_exists, twitter)
Exemplo n.º 4
0
 def test_find_by_site_name(self):
     '''
     Test to check if the find_by_account_type method returns the correct credential
     '''
     self.new_credential.save_credentials()
     twitter = Credential('samuel', 'twitter', 'samuel-sam', '120819985')
     twitter.save_credentials()
     credential_found = Credential.find_by_site_name('twitter')
     self.assertEqual(credential_found.password, twitter.password)
Exemplo n.º 5
0
    def test_find_by_site_name(self):
        '''
		Test to check if the find_by_site_name method returns the correct credential
		'''
        self.new_credential.save_credentials()
        twitter = Credential('Montana', 'Twitter', 'nccharles', 'ps123')
        twitter.save_credentials()
        credential_exists = Credential.find_by_site_name('Twitter')
        self.assertEqual(credential_exists, twitter)
Exemplo n.º 6
0
    def test_find_by_site_name(self):
        """
		Test to check if the find_by_site_name method returns the correct credential
		"""
        self.new_credential.save_credentials()
        Instagram = Credential('Elkwal', 'Instagram', 'Elkwal_Simple',
                               'Elukwal3')
        Instagram.save_credentials()
        credential_exists = Credential.find_by_site_name('Instagram')
        self.assertEqual(credential_exists, Instagram)
Exemplo n.º 7
0
 def test_copy_credential(self):
     self.new_credential.save_credentials()
     twitter = Credential('joe','Twitter','joe','pswd100')
     twitter.save_credentials()
     find_credential = None
     for credential in Credential.user_credentials_list:
         find_credential =Credential.find_by_site_name(credential.site_name)
         return pyperclip.copy(find_credential.password)
     Credential.copy_credential(self.new_credential.site_name)
     self.assertEqual('pswd100',pyperclip.paste())
     print(pyperclip.paste())
Exemplo n.º 8
0
 def test_copy_credential(self):
     '''
     Test to check if the copy a credential method copies the correct credential
     '''
     self.new_credential.save_credentials()
     twitter = Credential('Mary','Twitter','Jacintaatek','pswd540')
     twitter.save_credentials()
     find_credential = None
     for credential in Credential.user_credentials_list:
                     find_credential =Credential.find_by_site_name(credential.site_name)
                     return pyperclip.copy(find_credential.password)
     Credential.copy_credential(self.new_credential.site_name)
     self.assertEqual('pswd540',pyperclip.paste())
     print(pyperclip.paste())
Exemplo n.º 9
0
    def test_copy_credential(self):
        """
		Test to check if the copy a credential method copies the correct credential
		"""
        self.new_credential.save_credentials()
        Instagram = Credential('Sylvia', 'Elkwal', 'sylviaelkwal', 'Elukwal3')
        Instagram.save_credentials()
        find_credential = None
        for credential in Credential.credentials_list:
            find_credential = Credential.find_by_site_name(
                credential.site_name)
            pyperclip.copy(find_credential.password)
            Credential.copy_credential(self.new_credential.site_name)
            self.assertEqual('Elukwal3', pyperclip.paste())
            print(pyperclip.paste())
Exemplo n.º 10
0
    def test_copy_credential(self):
        """
		Test to check if the copy a credential method copies the correct credential
		"""
        self.new_credential.save_credentials()
        twitter = Credential('Njoroge', 'Twitter', 'Njoroge_Chosen', 'boo98')
        twitter.save_credentials()
        find_credential = None
        for credential in Credential.user_credentials_list:
            find_credential = Credential.find_by_site_name(
                credential.site_name)
            return pyperclip.copy(find_credential.password)
        Credential.copy_credential(self.new_credential.site_name)
        self.assertEqual('boo98', pyperclip.paste())
        print(pyperclip.paste())