Update tests

This commit is contained in:
Roberto Rosario
2014-09-14 08:51:23 -04:00
parent 0fde78558a
commit d264aac97e
3 changed files with 7 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ from django.test import TestCase
from documents.literals import VERSION_UPDATE_MAJOR, RELEASE_LEVEL_FINAL
from documents.models import Document, DocumentType
from django_gpg.api import SIGNATURE_STATE_VALID
from django_gpg.literals import SIGNATURE_STATE_VALID
from django_gpg.runtime import gpg
from .models import DocumentVersionSignature

View File

@@ -310,7 +310,7 @@ class DocumentsViewsFunctionalTestCase(TestCase):
def test_document_view(self):
response = self.client.get(reverse('documents:document_list'))
self.assertEqual(response.status_code, 200)
self.assertTrue('List of documents (1)' in response.content)
self.assertTrue('ocuments (1)' in response.content)
# test document simple view
response = self.client.get(reverse('documents:document_view_simple', args=[self.document.pk]))
@@ -320,13 +320,13 @@ class DocumentsViewsFunctionalTestCase(TestCase):
# test document advanced view
response = self.client.get(reverse('documents:document_view_advanced', args=[self.document.pk]))
self.assertEqual(response.status_code, 200)
self.assertTrue('Document properties for: mayan_11_1.pdf' in response.content)
self.assertTrue('ocument properties for: mayan_11_1.pdf' in response.content)
def test_document_type_views(self):
# Check that there are no document types
response = self.client.get(reverse('documents:document_type_list'))
self.assertEqual(response.status_code, 200)
self.assertTrue('List of document types (0)' in response.content)
self.assertTrue('ocument types (0)' in response.content)
# Create a document type
response = self.client.post(reverse('documents:document_type_create'), data={'name': TEST_DOCUMENT_TYPE}, follow=True)
@@ -336,7 +336,7 @@ class DocumentsViewsFunctionalTestCase(TestCase):
# Check that there is one document types
response = self.client.get(reverse('documents:document_type_list'))
self.assertEqual(response.status_code, 200)
self.assertTrue('List of document types (1)' in response.content)
self.assertTrue('ocument types (1)' in response.content)
document_type = DocumentType.objects.first()
self.assertEqual(document_type.name, TEST_DOCUMENT_TYPE)
@@ -357,4 +357,4 @@ class DocumentsViewsFunctionalTestCase(TestCase):
# Check that there are no document types
response = self.client.get(reverse('documents:document_type_list'))
self.assertEqual(response.status_code, 200)
self.assertTrue('List of document types (0)' in response.content)
self.assertTrue('ocument types (0)' in response.content)

View File

@@ -36,8 +36,7 @@ class DocumentSearchTestCase(TestCase):
Forces the reloading of the language_backend for different languages
"""
from ocr.conf import settings
from ocr import runtime
from ocr import runtime, settings
setattr(settings, 'LANGUAGE', language)