'If a LogEntry is missing content_type it will not display it in span tag under the hyperlink.'

def test_recentactions_without_content_type(self):

    response = self.client.get('/test_admin/admin/')
    should_contain = ('<a    href="admin_views/modelwithstringprimarykey/%s/">%s</a>' % (quote(self.pk), escape(self.pk)))
    self.assertContains(response, should_contain)
    should_contain = 'Model    with    string    primary    key'
    self.assertContains(response, should_contain)
    logentry = LogEntry.objects.get(content_type__name__iexact=should_contain)
    logentry.content_type = None
    logentry.save()
    counted_presence_before = response.content.count(should_contain)
    response = self.client.get('/test_admin/admin/')
    counted_presence_after = response.content.count(should_contain)
    self.assertEquals((counted_presence_before - 1), counted_presence_after)
