mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-03-16 22:20:26 +00:00
17 lines
461 B
Python
17 lines
461 B
Python
|
|
from django.test import TestCase
|
||
|
|
from testapp.models import SimpleModel
|
||
|
|
|
||
|
|
|
||
|
|
class ModelTest(TestCase):
|
||
|
|
def setUp(self):
|
||
|
|
self.obj_simple = SimpleModel.objects.create(text='I am not difficult.')
|
||
|
|
|
||
|
|
def test_simple_create(self):
|
||
|
|
"""Mutations on simple models are logged correctly."""
|
||
|
|
# Create the object to work with
|
||
|
|
obj = self.obj_simple
|
||
|
|
obj.save()
|
||
|
|
|
||
|
|
# Check for log entries
|
||
|
|
self.assertTrue(obj.history)
|