def test_singular_delete_bad_id(json_client, cheetah_mock_bad_ids):
    response = json_client.delete("/api/v1/animals/cheetahs/2")
    assert response.status_code == 404
    assert not cheetah_mock_bad_ids["queryset"].delete.called
def test_singular_delete(json_client, cheetah_mock):
    response = json_client.delete("/api/v1/animals/cheetahs/1")
    assert response.status_code == 200
    cheetah_mock["queryset"].delete.assert_called_once_with()
def test_plural_delete(json_client, cheetah_mock):
    response = json_client.delete("/api/v1/animals/cheetahs")
    assert response.status_code == 405
    assert not cheetah_mock["queryset"].delete.called