mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #29370 -- Added choices to LogEntry.action_flag field.
This commit is contained in:
parent
523e04dfeb
commit
c4158d050f
3 changed files with 34 additions and 1 deletions
|
@ -253,3 +253,10 @@ class LogEntryTests(TestCase):
|
|||
proxy_delete_log = LogEntry.objects.latest('id')
|
||||
self.assertEqual(proxy_delete_log.action_flag, DELETION)
|
||||
self.assertEqual(proxy_delete_log.content_type, proxy_content_type)
|
||||
|
||||
def test_action_flag_choices(self):
|
||||
tests = ((1, 'Addition'), (2, 'Change'), (3, 'Deletion'))
|
||||
for action_flag, display_name in tests:
|
||||
with self.subTest(action_flag=action_flag):
|
||||
log = LogEntry(action_flag=action_flag)
|
||||
self.assertEqual(log.get_action_flag_display(), display_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue