Skip to content

Commit 7f571c7

Browse files
author
Ross Mechanic
committed
Fixed verbosity issue with django < 1.8
1 parent 231f625 commit 7f571c7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

simple_history/tests/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from django.contrib import admin
44

55
from simple_history.admin import SimpleHistoryAdmin
6-
from .models import Poll, Choice, Person, Book, Document, Paper, Employee, TrackedConcreteBaseExternal
6+
from .models import Poll, Choice, Person, Book, Document, Paper, Employee, ConcreteExternal
77

88

99
class PersonAdmin(SimpleHistoryAdmin):
@@ -22,4 +22,4 @@ class ChoiceAdmin(SimpleHistoryAdmin):
2222
admin.site.register(Document, SimpleHistoryAdmin)
2323
admin.site.register(Paper, SimpleHistoryAdmin)
2424
admin.site.register(Employee, SimpleHistoryAdmin)
25-
admin.site.register(TrackedConcreteBaseExternal, SimpleHistoryAdmin)
25+
admin.site.register(ConcreteExternal, SimpleHistoryAdmin)

simple_history/tests/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class UntrackedConcreteBase(models.Model):
342342
pass
343343

344344

345-
class TrackedConcreteBaseExternal(AbstractExternal):
345+
class ConcreteExternal(AbstractExternal):
346346
name = models.CharField(max_length=50)
347347

348348
class Meta:

simple_history/tests/tests/test_admin.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from simple_history.models import HistoricalRecords
1515
from simple_history.admin import SimpleHistoryAdmin, get_complete_version
16-
from ..models import Book, Person, Poll, State, Employee, Choice, TrackedConcreteBaseExternal
16+
from ..models import Book, Person, Poll, State, Employee, Choice, ConcreteExternal
1717

1818
try:
1919
from django.contrib.admin.utils import quote
@@ -559,13 +559,13 @@ def test_history_form_view_getting_history_abstract_external(self):
559559
request.user = self.user
560560
request.POST = {'_change_history': True}
561561

562-
obj = TrackedConcreteBaseExternal.objects.create(name='test')
562+
obj = ConcreteExternal.objects.create(name='test')
563563
obj.name = "new_test"
564564
obj.save()
565565
history = obj.history.all()[0]
566566

567567
admin_site = AdminSite()
568-
admin = SimpleHistoryAdmin(TrackedConcreteBaseExternal, admin_site)
568+
admin = SimpleHistoryAdmin(ConcreteExternal, admin_site)
569569

570570
with patch('simple_history.admin.render') as mock_render:
571571
with patch('simple_history.admin.SIMPLE_HISTORY_EDIT', True):
@@ -584,9 +584,9 @@ def test_history_form_view_getting_history_abstract_external(self):
584584
'errors': ANY,
585585
'app_label': 'tests',
586586
'original_opts': ANY,
587-
'changelist_url': '/admin/tests/trackedconcretebaseexternal/',
587+
'changelist_url': '/admin/tests/concreteexternal/',
588588
'change_url': ANY,
589-
'history_url': '/admin/tests/trackedconcretebaseexternal/{pk}/history/'.format(
589+
'history_url': '/admin/tests/concreteexternal/{pk}/history/'.format(
590590
pk=obj.pk),
591591
'add': False,
592592
'change': True,

0 commit comments

Comments
 (0)