'Delete queries can safely contain sliced subqueries'

def test_sliced_delete(self):

    try:
        DumbCategory.objects.filter(id__in=DumbCategory.objects.order_by('-id')[0:1]).delete()
        self.assertEqual(set(DumbCategory.objects.values_list('id', flat=True)), set([1, 2]))
    except DatabaseError:
        self.assertFalse(connections[DEFAULT_DB_ALIAS].features.allow_sliced_subqueries)
