Skip to content

Instantly share code, notes, and snippets.

@gen1us2k
Last active December 3, 2019 09:22
Show Gist options
  • Select an option

  • Save gen1us2k/94a72c2bb44407a91022026e290ef7b4 to your computer and use it in GitHub Desktop.

Select an option

Save gen1us2k/94a72c2bb44407a91022026e290ef7b4 to your computer and use it in GitHub Desktop.
import pytest
import json
from django.urls import reverse
@pytest.mark.django_db
def test_empty_list_of_users(client):
response = client.get(reverse('list-users'))
data = json.loads(response.content)
assert {"users": []} == data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment