def test_with_avatar(self, website, user):
     if not user:
         pytest.skip('website not supported')
     link = username_api.check_username(website, user)['avatar']
     response = username_api.session.get(link)
     assert (response.headers.get('content-type', '').startswith('image/') or
             response.headers.get('content-type') ==
             'application/octet-stream')
def main():
    username = input("Enter the username : "******"Taken/Not Available on {}".format(site))
        else:
            print("Taken on {}".format(site))
def main():
    username = input('Enter the username : '******'Checking username availability now...')

    for site in sites:
        res = check_username(site, username)
        if not res['possible']:
            print('Impossible on {}'.format(site))
        elif res['status'] == 404 or res['status'] == 301:
            print('Available on {}'.format(site))
        else:
            print('Taken on {}'.format(site))
 def test_without_avatar(self, website, user):
     if not user:
         pytest.skip('website not supported')
     assert username_api.check_username(website, user)['avatar'] is None