def test_select_related(self):
        country = Country.objects.create(name='Australia')
        state = State.objects.create(name='New South Wales', country=country)

        resp = [s.name for s in State.objects.select_related()]
        self.assertEqual(resp, ['New South Wales'])

        resp = [s.name for s in StateProxy.objects.select_related()]
        self.assertEqual(resp, ['New South Wales'])

        self.assertEqual(StateProxy.objects.get(name='New South Wales').name,
            'New South Wales')

        resp = StateProxy.objects.select_related().get(name='New South Wales')
        self.assertEqual(resp.name, 'New South Wales')
Handles the user pressing the cancel search button.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/modeltests/proxy_models/tests.py/ProxyModelTests.test_select_related--crossover with--dataset/ETHPy150Open enthought/traitsui/traitsui/wx/search_editor.py/SearchEditor.clear_text