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 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_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_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_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): ''' 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_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_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): """ 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 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_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_delete_credential(self): ''' test case to check if an unwanted credential is deleted ''' self.new_credential.save_credential() test_credential = Credential("anum","Instagram","anumasif","fdsf134csd") test_credential.save_credential() test_credential.delete_credential() self.assertEqual(len(Credential.credential_list),1)
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_delete_credentials(self): """ test to check if the user can delete his or her credentials """ self.new_credential.save_credential() test_credential = Credential("owinolawrence", "instragram", "2017") test_credential.save_credential() self.new_credential.delete_credentials( ) # Deleting a credential object
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_credential_exists(self): """ test to check if we can return a Boolean if we cannot find the account name """ self.new_credential.save_credential() test_credential = Credential("owinolawrence", "twitter", "2018") test_credential.save_credential() credential_exist = Credential.credential_exists("twitter") self.assertTrue(credential_exist)
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_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_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_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_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_find_user_by_name(self): """ test to check if we can find a user by using account name and display information """ self.new_credential.save_credential() test_credential = Credential("owinolawrence", "twitter", "2018") test_credential.save_credential() found_credential = Credential.find_by_name("twitter") self.assertEqual(found_credential.account_password, "2018")
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 ("Twitter","khaleesifan","24hugugugu") # new credential test_credential.save_credential() self.new_credential.delete_credential()# Deleting a credential object self.assertEqual(len(Credential.credential_list),1)
def test_delete_credential(self): ''' tests if we can delete a credential from our credentials list ''' self.new_credential.save_credential() test_credential = Credential("Github","Gift-Lumumba","gL0711419032") test_credential.save_credential() self.new_credential.delete_credential() #deletes credentials object self.assertEqual (len(Credential.credential_list),1)
def test_find_credential(self): ''' test case to find credential of a particular site ''' self.new_credential.save_credential() test_credential = Credential("henry", "facebook", "halkano", "fdsf134csd") test_credential.save_credential() self.assertEqual(Credential.find_credential("facebook"), test_credential)
def test_delete_credential(self): ''' test case to check if an unwanted credential is deleted ''' self.new_credential.save_credential() test_credential = Credential("henry", "facebook", "halkano", "fdsf134csd") test_credential.save_credential() test_credential.delete_credential() self.assertEqual(len(Credential.credential_list), 1)
def test_credential_exist(self): """ testing if we can return a Boolean if the credential is not found """ self.new_credential.save_credential() test_credential = Credential("Arijm", "*****@*****.**", "instagram", "mango") #new credential test_credential.save_credential() credential_exists = Credential.credential_exists("Arijm") self.assertTrue(credential_exists)
def test_find_credential_by_username(self): """ test to check if we can find a user by his name """ self.new_credential.save_credential() test_credential = Credential("Arijm", "*****@*****.**", "instagram", "mango") #new credential test_credential.save_credential() found_credential = Credential.find_by_user_name("Arijm") self.assertEqual(found_credential.user_name, test_credential.user_name)
def test_find_credential_by_account_name(self): ''' to check if we can find a credential by the account name and display more information about it ''' self.new_credential.save_credential() test_credential = Credential("Github","Gift-Lumumba","gL0711419032") test_credential.save_credential() found_credential =Credential.find_by_account_name("Github") self.assertEqual(found_credential.password,test_credential.password)
def test_delete_credential(self): """ To test if credentail can be deleted """ self.new_credential.save_credential() test_credential=Credential('twitter',"barackjunior",'387r3b7a') test_credential.save_credential() self.new_credential.delete_credential() self.assertEqual(len(Credential.credential_list),1)