Exemple #1
0
    def test_find_credentials_by_site(self):
        '''
        test to check if we can find the relevant username and password combination whiile searching by username
        '''
        self.new_credentials.save_credentials()
        test_credentials = Credentials("finsta", "boba", "tea")
        test_credentials.save_credentials()
        found_credentials = Credentials.find_by_site("finsta")

        self.assertEqual(found_credentials.site, test_credentials.site)
Exemple #2
0
def find_by_site(site):
    '''
    Function that finds a credential by site and returns the credentials
    '''
    return Credentials.find_by_site(site)