kopia lustrzana https://github.com/jedie/PyInventory
Check django-revision integration
rodzic
0f07ce4f2e
commit
27e499469c
|
@ -11,6 +11,7 @@ from django.template.defaulttags import CsrfTokenNode, NowNode
|
|||
from django.test import TestCase, override_settings
|
||||
from django.utils import timezone
|
||||
from django_tools.unittest_utils.mockup import ImageDummy
|
||||
from reversion.models import Revision
|
||||
|
||||
from inventory import __version__
|
||||
from inventory.models import ItemImageModel, ItemModel
|
||||
|
@ -144,6 +145,10 @@ class AdminTestCase(HtmlAssertionMixin, TestCase):
|
|||
html = html.replace(str(item.pk), '<removed-UUID>')
|
||||
assert_html_snapshot(got=html, validate=False)
|
||||
|
||||
# django-revision integration:
|
||||
comments = list(Revision.objects.order_by('date_created').values_list('comment', flat=True))
|
||||
self.assertEqual(comments, ['Added.'])
|
||||
|
||||
def test_new_item_with_image(self):
|
||||
"""
|
||||
https://github.com/jedie/PyInventory/issues/33
|
||||
|
|
|
@ -9,6 +9,7 @@ from django.template.defaulttags import CsrfTokenNode, NowNode
|
|||
from django.test import TestCase, override_settings
|
||||
from django_tools.unittest_utils.mockup import ImageDummy
|
||||
from model_bakery import baker
|
||||
from reversion.models import Revision
|
||||
|
||||
from inventory import __version__
|
||||
from inventory.models import MemoImageModel, MemoModel
|
||||
|
@ -98,6 +99,10 @@ class AdminTestCase(HtmlAssertionMixin, TestCase):
|
|||
|
||||
assert item.user_id == self.normaluser.pk
|
||||
|
||||
# django-revision integration:
|
||||
comments = list(Revision.objects.order_by('date_created').values_list('comment', flat=True))
|
||||
self.assertEqual(comments, ['Added.'])
|
||||
|
||||
def test_new_item_with_image(self):
|
||||
"""
|
||||
https://github.com/jedie/PyInventory/issues/33
|
||||
|
|
Ładowanie…
Reference in New Issue