def test_result_list_empty_changelist_value(self):
        """
        Regression test for #14982: EMPTY_CHANGELIST_VALUE should be honored
        for relationship fields
        """
        new_child = Child.objects.create(name='name', parent=None)
        request = self.factory.get('/child/')
        m = ChildAdmin(Child, custom_site)
        cl = ChangeList(request, Child, *get_changelist_args(m))
        cl.formset = None
        template = Template('{% load admin_list %}{% spaceless %}{% result_list cl %}{% endspaceless %}')
        context = Context({'cl': cl})
        table_output = template.render(context)
        link = reverse('admin:admin_changelist_child_change', args=(new_child.id,))
        row_html = (
            '<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)
dataset/ETHPy150Open django/django/tests/admin_changelist/tests.py/ChangeListTests.test_result_list_empty_changelist_value/original