def test_use_index(self):
        name_idx = index_name(Author, 'name')
        with CaptureLastQuery() as cap:
            list(Author.objects.filter(name__gt='')
                               .use_index(name_idx))
        assert ('USE INDEX (`' + name_idx + '`)') in cap.query
        used = used_indexes(cap.query)
        assert len(used) == 0 or used in name_idx
dataset/ETHPy150Open adamchainz/django-mysql/tests/testapp/test_models.py/QueryHintTests.test_use_index/swapped operands of `in`