コード例 #1
0
def check_existing_accounts(social_account):
    '''
    function that checks if social account exists and returns a boolean
    :param social_account:
    :return:
    '''
    return SocialAccounts.social_account_exists(social_account)
コード例 #2
0
    def test_social_account_exists(self):
        '''
        we want to return a boolean if we cannot find a contact
        '''
        self.new_social_account.save_social_account()
        test_social_account = SocialAccounts("video","phoebe", "passvideo", "4") #new account to save
        test_social_account.save_social_account()

        account_exists= SocialAccounts.social_account_exists("video")
        self.assertTrue(account_exists)
コード例 #3
0
    def test_social_account_exists(self):
        '''
        we want to return a boolean if we cannot find a contact
        '''
        self.new_social_account.save_social_account()
        test_social_account = SocialAccounts("musical.ly", "cherucole",
                                             "passmusic",
                                             "9")  #new account to save
        test_social_account.save_social_account()

        account_exists = SocialAccounts.social_account_exists("musical.ly")
        self.assertTrue(account_exists)