Update linking app
Add keyword arguments. Update URL parameters to the '_id' form. Movernize tests and update them to use the latest test case improvements. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -2,20 +2,16 @@ from __future__ import unicode_literals
|
||||
|
||||
from mayan.apps.documents.tests import GenericDocumentTestCase
|
||||
|
||||
from ..models import SmartLink
|
||||
|
||||
from .literals import TEST_SMART_LINK_DYNAMIC_LABEL, TEST_SMART_LINK_LABEL
|
||||
from .mixins import SmartLinkTestMixin
|
||||
|
||||
|
||||
class SmartLinkTestCase(GenericDocumentTestCase):
|
||||
class SmartLinkTestCase(SmartLinkTestMixin, GenericDocumentTestCase):
|
||||
def test_dynamic_label(self):
|
||||
smart_link = SmartLink.objects.create(
|
||||
label=TEST_SMART_LINK_LABEL,
|
||||
dynamic_label=TEST_SMART_LINK_DYNAMIC_LABEL
|
||||
)
|
||||
smart_link.document_types.add(self.document_type)
|
||||
self._create_test_smart_link()
|
||||
|
||||
self.test_smart_link.document_types.add(self.document_type)
|
||||
|
||||
self.assertEqual(
|
||||
smart_link.get_dynamic_label(document=self.document),
|
||||
self.test_smart_link.get_dynamic_label(document=self.document),
|
||||
self.document.label
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user