'Helper method to chooses a restricted username for testing'

def random_restricted_username(self):

    from gratipay import RESTRICTED_USERNAMES
    random_item = random.choice(RESTRICTED_USERNAMES)
    while any(map(random_item.startswith, (u'%', u'~'))):
        random_item = random.choice(RESTRICTED_USERNAMES)
    return random_item
