def test_copy_email(self): """ test to confirm we are copying an email address from a found credential """ self.new_credential.save_credential() Credential.copy_email("Arijm") self.assertEqual(self.new_credential.email, pyperclip.paste())
def test_delete_credential(self): ''' test_delete_contact to test if we can remove credential from our credential list ''' self.new_credential.save_credential() test_credential = Credential ("Gmail","koyoo maxwel","maxwell0101") # new credential test_credential.save_credential()
def setUp(self): ''' Method to run before each test case ''' self.new_user = User("henry", "henry10") self.new_credential = Credential("henry", "Google", "halkano", "henry10")
def test_credential_exist(self): ''' test case to check if the credential exists ''' self.new_credential.save_credential() test_credential = Credential("anum","Instagram","anumasif","fdsf134csd") test_credential.save_credential() self.assertTrue(Credential.credential_exist("Instagram"))
def test_find_credential(self): ''' test case to find credential of a particular site ''' self.new_credential.save_credential() test_credential = Credential("anum","Instagram","anumasif","fdsf134csd") test_credential.save_credential() self.assertEqual(Credential.find_credential("Instagram"),test_credential)
def test_save_multiple_credential(self): ''' test case to check if we can save multiple credential objects to the credential list ''' self.new_credential.save_credential() test_credential = Credential("anum","Instagram","anumasif","fdsf134csd") test_credential.save_credential() self.assertEqual(len(Credential.credential_list),2)
def test_display_credentials(self): ''' test case to check if the function return the credential list of user ''' self.new_credential.save_credential() test_credential = Credential("anum","Instagram","anumasif","fdsf134csd") test_credential.save_credential() self.assertEqual(len(Credential.display_credentials("anum")),2)
def test_save_multiple_credential(self): ''' method that checks if we can save multiple credentials objects to credentials_list ''' self.new_credential.save_credential() test_credential = Credential("Github","Gift-Lumumba","gL0711419032") test_credential.save_credential() self.assertEqual(len(Credential.credential_list),2)
def test_save_credentials(self): ''' Test to check if the new credentials are saved ''' self.new_credential.save_credentials() twitter = Credential('Tony', 'Twitter', 'tonkin', 'tnkz000') twitter.save_credentials() self.assertEqual(len(Credential.credentials_list), 2)
def test_save_credentials(self): """ Test to check if the new credential info is saved into the credentials list """ self.new_credential.save_credentials() twitter = Credential('Njoroge', 'Twitter', 'Njoroge_Chosen', 'boo98') twitter.save_credentials() self.assertEqual(len(Credential.credentials_list), 9)
def test_save_credentials(self): ''' Test to check if the new credential info is saved into the credentials list ''' self.new_credential.save_credentials() twitter = Credential('Montana', 'Twitter', 'nccharles', 'ps123') twitter.save_credentials() self.assertEqual(len(Credential.credentials_list), 2)
def test_save_credentials(self): ''' Checking if credentials creted are successfully saved to the credentials list ''' self.new_credential.save_credentials() twitter = Credential('Wilstan', 'Twitter', 'awilo', '126yzr') twitter.save_credentials() self.assertEqual(len(Credential.credentials_list), 2)
def test_save_credentials(self): ''' Test to check if the new credential info is saved into the credentials list ''' self.new_credential.save_credentials() twitter = Credential('shadrack', 'Twitter', 's1234') twitter.save_credentials() self.assertEqual(len(Credential.cred_list), 2)
def test_save_multiple_credential(self): """ To check if we can save multiple objects into list """ self.new_credential.save_credential() test_credential = Credential ("Twitter","khaleesifan","24hugugugu") test_credential.save_credential() self.assertEqual(len(Credential.credential_list),2)
def test_find_credentials(self): self.new_credential.save_credential() test_credential = Credential("whatsapp", "manjeru", 12345) test_credential.save_credential() found_credential = Credential.find_by_account('whatsapp') found_credential = found_credential self.assertEqual(found_credential, test_credential)
def test_save_multiple_credential(self): """ To check if we can save multiple objects into list """ self.new_credential.save_credential() test_credential = Credential ("Gmail","koyoo maxwel","maxwell0101") test_credential.save_credential() self.assertEqual(len(Credential.credential_list),2)
def copy_password(cls, password): pass_found = Credential.find_by_sitename(site_name) pyperclip.copy(pass_found.password) self.new_contact.save_contact() Credential.copy_password("1234") self.assertEqual(self.new_user.password, pyperclip.paste())
def test_save_credentials(self): ''' Test to check if the new credential info is saved into the credentials list ''' self.new_credential.save_credentials() twitter = Credential('Sonn', 'Twitter', 'Brenda', 'pswd100') twitter.save_credentials() self.assertEqual(len(Credential.credentials_list), 2)
def test_save_credentials(self): ''' method which test to save credential ''' self.new_credential.save_credential() twitter = Credential("coco", "Twitter", "coco12", "33333") twitter.save_credential() self.assertEqual(len(Credential.credential_list), 2)
def test_save_credentials(self): ''' method which test to save credential ''' self.new_credential.save_credential() twitter = Credential("jeanne", "Twitter", "dukunde", "dukunde") twitter.save_credential() self.assertEqual(len(Credential.credential_list), 2)
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)
def test_save_multiple_credential(self): """ To test how to save multiple """ self.new_credential.save_credential() test_credential=Credential('twitter',"barackmaundu",'387r7b7a') test_credential.save_credential() self.assertEqual(len(Credential.credential_list),2)
def test_find_site(self): ''' Methode to find by site name and retun the correct credentials ''' self.new_credential.save_credential() twitter = Credential("Deborah", "Twitter", "Debby07", "Ingabineza") twitter.save_credential() credential_exists = Credential.find_site('Twitter') self.assertEqual(credential_exists, twitter)
def test_save_credentials(self): ''' method which test to save credential ''' self.new_credential.save_credential() twitter = Credential("Deborah", "Twitter", "Debby07", "Ingabineza") twitter.save_credential() self.assertEqual(len(Credential.credential_list), 2)
def test_find_site(self): ''' Methode to find by site name and retun the correct credentials ''' self.new_credential.save_credential() twitter = Credential("jeanne", "Twitter", "dukunde", "dukunde") twitter.save_credential() credential_exists = Credential.find_site('Twitter') self.assertEqual(credential_exists, twitter)
def test_credential_exist(self): """ test to check if we can return a true or false based on whether we find or can't find the credential. """ self.new_credential.save_credentials() credential = Credential("user", "site", "pass") credential.save_credentials() credential_is_found = Credential.if_credential_exist("user") self.assertTrue(credential_is_found)
def test_credential_exist(self): ''' test case to check if the credential exists ''' self.new_credential.save_credential() test_credential = Credential("henry", "facebook", "halkano", "fdsf134csd") test_credential.save_credential() self.assertTrue(Credential.credential_exist("facebook"))
def test_save_multiple_credential(self): ''' test case to check if we can save multiple credential objects to the credential list ''' self.new_credential.save_credential() test_credential = Credential("henry", "facebook", "halkano", "fdsf134csd") test_credential.save_credential() self.assertEqual(len(Credential.credential_list), 2)
def test_display_credentials(self): ''' test case to check if the function return the credential list of user ''' self.new_credential.save_credential() test_credential = Credential("henry", "facebook", "halkano", "fdsf134csd") test_credential.save_credential() self.assertEqual(len(Credential.display_credentials("henry")), 2)
def test_save_credentials(self): """ Test to check if the new credential information is saved in the credentials list """ self.new_credential.save_credentials() Instagram = Credential('Elkwal', 'Instagram', 'Elkwal_Simple', 'Elukwal3') Instagram.save_credentials() self.assertEqual(len(Credential.credentials_list), 2)