def test_two_characters_long_field(self):
        modeladmin = BookAdmin(Book, site)
        request = self.request_factory.get('/', {'no': '207'})
        changelist = self.get_changelist(request, Book, modeladmin)

        # Make sure the correct queryset is returned
        queryset = changelist.get_queryset(request)
        self.assertEqual(list(queryset), [self.bio_book])

        filterspec = changelist.get_filters(request)[0][-1]
        self.assertEqual(force_text(filterspec.title), 'number')
        choices = list(filterspec.choices(changelist))
        self.assertEqual(choices[2]['selected'], True)
        self.assertEqual(choices[2]['query_string'], '?no=207')
Creates a CREATE statement that makes a new temporary table.
dataset/ETHPy150Open django/django/tests/admin_filters/tests.py/ListFiltersTests.test_two_characters_long_field--crossover with--dataset/ETHPy150Open california-civic-data-coalition/django-postgres-copy/postgres_copy/__init__.py/CopyMapping.prep_create