Files
mayan-edms/mayan/apps/documents/tests/test_widgets.py
Michael Price 395be18151 Fix widget test.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:15:10 -04:00

15 lines
516 B
Python

from __future__ import unicode_literals
from ..widgets import DocumentPageThumbnailWidget
from .test_models import GenericDocumentTestCase
class DocumentPageWidgetTestCase(GenericDocumentTestCase):
def test_document_list_view_document_with_no_pages(self):
document_thumbnail_widget = DocumentPageThumbnailWidget()
self.document.pages.all().delete()
result = document_thumbnail_widget.render(instance=self.document)
self.assertTrue(self.document.get_absolute_url() in result)