diff --git a/complaint_search/export.py b/complaint_search/export.py index 8af81f6..67e4daf 100644 --- a/complaint_search/export.py +++ b/complaint_search/export.py @@ -4,6 +4,10 @@ from django.http import StreamingHttpResponse +from rest_framework.exceptions import ValidationError + +from complaint_search.defaults import MAX_DOWNLOAD_SIZE + class OpenSearchExporter(object): def _check_download_size(self, total_count): diff --git a/complaint_search/tests/test_export.py b/complaint_search/tests/test_export.py index 0180a52..1e5179a 100644 --- a/complaint_search/tests/test_export.py +++ b/complaint_search/tests/test_export.py @@ -7,7 +7,9 @@ from django.test import TestCase from parameterized import parameterized +from rest_framework.exceptions import ValidationError +from complaint_search.defaults import MAX_DOWNLOAD_SIZE from complaint_search.export import OpenSearchExporter diff --git a/complaint_search/views.py b/complaint_search/views.py index b73427c..b7b1cdc 100644 --- a/complaint_search/views.py +++ b/complaint_search/views.py @@ -23,7 +23,6 @@ from complaint_search.serializer import ( SearchInputSerializer, SuggestFilterInputSerializer, - SuggestInputSerializer, TrendsInputSerializer, ) from complaint_search.throttling import (