Update all tests to use setting value overriding.

This commit is contained in:
Roberto Rosario
2015-09-06 04:01:40 -04:00
parent f59b96ac5e
commit 3e3eca4c0e
16 changed files with 42 additions and 103 deletions
+2 -4
View File
@@ -5,6 +5,7 @@ from json import loads
from django.contrib.auth.models import User
from django.core.files import File
from django.core.urlresolvers import reverse
from django.test import override_settings
from rest_framework.test import APITestCase
@@ -15,6 +16,7 @@ from documents.tests import (
)
@override_settings(OCR_AUTO_OCR=False)
class SearchAPITestCase(APITestCase):
"""
Test the search API endpoints
@@ -36,10 +38,6 @@ class SearchAPITestCase(APITestCase):
label=TEST_DOCUMENT_TYPE
)
ocr_settings = document_type.ocr_settings
ocr_settings.auto_ocr = False
ocr_settings.save()
with open(TEST_SMALL_DOCUMENT_PATH) as file_object:
document = document_type.new_document(
file_object=File(file_object),