@pytest.mark.django_db
def test_create_user_view(admin_client):
    url = reverse('wagtailusers_users:add')
    response = admin_client.post(url, data=USER_DETAILS_CREATE)
    assert (response.context['message'] == 'User test created.')
    assert (response.status_code == status.HTTP_302_FOUND)
    assert (response.url == reverse('wagtailusers_users:index'))
@pytest.mark.django_db
def test_create_user_view(admin_client):
    url = reverse('wagtailusers_users:add')
    response = admin_client.post(url, data=USER_DETAILS_CREATE)
    assert (response.context['message'] == 'User test created.')
    assert (response.status_code == status.HTTP_302_FOUND)
    assert (response.url == reverse('wagtailusers_users:index'))