def METHOD_NAME(db, client, username, password):
    client.login(username=username, password=password)
    instances = Attribute.objects.order_by('-level')
    for instance in instances:
        url = reverse(urlnames['detail'], args=[instance.pk])
        response = client.get(url)
        assert response.status_code == status_map['detail'][username], response.json()