mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed E128 flake8 warnings in tests/.
This commit is contained in:
parent
df8d8d4292
commit
92053acbb9
148 changed files with 2073 additions and 2248 deletions
|
@ -12,8 +12,7 @@ site.register(User, UserAdmin)
|
|||
|
||||
class CustomPaginator(Paginator):
|
||||
def __init__(self, queryset, page_size, orphans=0, allow_empty_first_page=True):
|
||||
super(CustomPaginator, self).__init__(queryset, 5, orphans=2,
|
||||
allow_empty_first_page=allow_empty_first_page)
|
||||
super(CustomPaginator, self).__init__(queryset, 5, orphans=2, allow_empty_first_page=allow_empty_first_page)
|
||||
|
||||
|
||||
class EventAdmin(admin.ModelAdmin):
|
||||
|
|
|
@ -130,8 +130,7 @@ class ChangeListTests(TestCase):
|
|||
'<tbody><tr class="row1"><th class="field-name"><a href="%s">name</a></th>'
|
||||
'<td class="field-parent nowrap">-</td></tr></tbody>' % link
|
||||
)
|
||||
self.assertNotEqual(table_output.find(row_html), -1,
|
||||
'Failed to find expected row element: %s' % table_output)
|
||||
self.assertNotEqual(table_output.find(row_html), -1, 'Failed to find expected row element: %s' % table_output)
|
||||
|
||||
def test_result_list_set_empty_value_display_on_admin_site(self):
|
||||
"""
|
||||
|
@ -152,8 +151,7 @@ class ChangeListTests(TestCase):
|
|||
'<tbody><tr class="row1"><th class="field-name"><a href="%s">name</a></th>'
|
||||
'<td class="field-parent nowrap">???</td></tr></tbody>' % link
|
||||
)
|
||||
self.assertNotEqual(table_output.find(row_html), -1,
|
||||
'Failed to find expected row element: %s' % table_output)
|
||||
self.assertNotEqual(table_output.find(row_html), -1, 'Failed to find expected row element: %s' % table_output)
|
||||
|
||||
def test_result_list_set_empty_value_display_in_model_admin(self):
|
||||
"""
|
||||
|
@ -172,8 +170,7 @@ class ChangeListTests(TestCase):
|
|||
'<tbody><tr class="row1"><th class="field-name"><a href="%s">name</a></th>'
|
||||
'<td class="field-age_display">&dagger;</td><td class="field-age">-empty-</td></tr></tbody>' % link
|
||||
)
|
||||
self.assertNotEqual(table_output.find(row_html), -1,
|
||||
'Failed to find expected row element: %s' % table_output)
|
||||
self.assertNotEqual(table_output.find(row_html), -1, 'Failed to find expected row element: %s' % table_output)
|
||||
|
||||
def test_result_list_html(self):
|
||||
"""
|
||||
|
@ -194,8 +191,7 @@ class ChangeListTests(TestCase):
|
|||
'<tbody><tr class="row1"><th class="field-name"><a href="%s">name</a></th>'
|
||||
'<td class="field-parent nowrap">Parent object</td></tr></tbody>' % link
|
||||
)
|
||||
self.assertNotEqual(table_output.find(row_html), -1,
|
||||
'Failed to find expected row element: %s' % table_output)
|
||||
self.assertNotEqual(table_output.find(row_html), -1, 'Failed to find expected row element: %s' % table_output)
|
||||
|
||||
def test_result_list_editable_html(self):
|
||||
"""
|
||||
|
@ -894,8 +890,7 @@ class SeleniumTests(AdminSeleniumTestCase):
|
|||
Ensure that the status line for selected rows gets updated correctly (#22038)
|
||||
"""
|
||||
self.admin_login(username='super', password='secret')
|
||||
self.selenium.get('%s%s' % (self.live_server_url,
|
||||
reverse('admin:auth_user_changelist')))
|
||||
self.selenium.get(self.live_server_url + reverse('admin:auth_user_changelist'))
|
||||
|
||||
form_id = '#changelist-form'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue