コード例 #1
0
    def test_credential_exists(self):
        '''
        Test case to check if a credential exists in the credential_list
        '''
        self.new_credential.save_credential()
        test_credential = Credentials("Instagram", "dainadee",
                                      "*****@*****.**", "pepe123")
        test_credential.save_credential()

        credential_exists = Credentials.credential_exists("Instagram")
        self.assertTrue(credential_exists)
コード例 #2
0
    def test_credential_exists(self):
        '''
        test to check if we can return a Boolean  if we cannot find the contact.
        '''
        self.new_credential.save_credential()
        test_credential = Credentials ("mercyVuu","P46HJ","yahoo")
        test_credential.save_credential()

        credential_exists = Credentials.credential_exists("mercyVuu")

        self.assertEqual(credential_exists)
コード例 #3
0
def credential_exists(account):
    """
    Function that check if a Credentials exists with that account name and return true or false

    """
    return Credentials.credential_exists(account)