def METHOD_NAME(db, client, username, password, project_id, snapshot_id):
    client.login(username=username, password=password)
    snapshot = Snapshot.objects.filter(project_id=project_id, id=snapshot_id).filter()
    url = reverse(urlnames['detail'], args=[project_id, snapshot_id])
    response = client.get(url)
    if snapshot and project_id in view_snapshot_permission_map.get(username, []):
        assert response.status_code == 200
        assert isinstance(response.json(), dict)
        assert response.json().get('id') == snapshot_id
    else:
        assert response.status_code == 404