'Verifies that inclusion tag result_list generates a table when with
default ModelAdmin settings.'

def test_result_list_html(self):

    new_parent = Parent.objects.create(name=u'parent')
    new_child = Child.objects.create(name=u'name', parent=new_parent)
    request = self.factory.get(u'/child/')
    m = ChildAdmin(Child, admin.site)
    list_display = m.get_list_display(request)
    list_display_links = m.get_list_display_links(request, list_display)
    cl = ChangeList(request, Child, list_display, list_display_links, m.list_filter, m.date_hierarchy, m.search_fields, m.list_select_related, m.list_per_page, m.list_max_show_all, m.list_editable, m)
    cl.formset = None
    template = Template(u'{%    load    admin_list    %}{%    spaceless    %}{%    result_list    cl    %}{%    endspaceless    %}')
    context = Context({u'cl': cl})
    table_output = template.render(context)
    link = reverse(u'admin:admin_changelist_child_change', args=(new_child.id,))
    row_html = (u'<tbody><tr    class="row1"><th><a    href="%s">name</a></th><td    class="nowrap">Parent    object</td></tr></tbody>' % link)
    self.assertFalse((table_output.find(row_html) == (-1)), (u'Failed    to    find    expected    row    element:    %s' % table_output))
