import json


def test_unauthenticated_user_views_questions(test_client):
    """
    test that unauthenticated user can view questions
    """
    response = test_client.get('/api/v2/questions')

    assert response.status_code == 200

    result = json.loads(response.data.decode('utf8'))

    return result