def test_expected_profile_url(request, app, entity):
    """Test that urls are built correctly, based on the user_mode"""
    url = profile_url_for(entity)
    if app.user_mode == 'single':
        assert url == '/profile'
    elif app.user_mode == 'multiple':
        assert url == '/' + entity.name + '/profile'
    elif app.user_mode == 'subdomain':
        assert url == 'http://{}.example.com/profile'.format(entity.name)
dataset/ETHPy150Open pytent/pytentd/tentd/tests/test_app.py/test_expected_profile_url/original