diff options
| author | Collin Anderson <collin@onetencommunications.com> | 2013-08-06 12:38:31 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-08-06 13:41:52 -0400 |
| commit | d53e574676ba0809394017f1f3a5bc24512e5bed (patch) | |
| tree | 55eeacccf46e98a63d0761023a28b09cad77ed50 /tests | |
| parent | 709cd2c4b751bcdfed7c8a27306778a758523658 (diff) | |
Fixed #20865 -- Fixed raw_id_fields to work with callable limit_choices_to.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/admin_widgets/tests.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index d4521a585e..5a88df1e57 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -226,6 +226,13 @@ class AdminForeignKeyRawIdWidget(DjangoTestCase): self.assertEqual(lookup1, {'color__in': 'red,blue'}) self.assertEqual(lookup1, lookup2) + def test_url_params_from_lookup_dict_callable(self): + def my_callable(): + return 'works' + lookup1 = widgets.url_params_from_lookup_dict({'myfield': my_callable}) + lookup2 = widgets.url_params_from_lookup_dict({'myfield': my_callable()}) + self.assertEqual(lookup1, lookup2) + class FilteredSelectMultipleWidgetTest(DjangoTestCase): def test_render(self): @@ -915,4 +922,4 @@ class AdminRawIdWidgetSeleniumChromeTests(AdminRawIdWidgetSeleniumFirefoxTests): webdriver_class = 'selenium.webdriver.chrome.webdriver.WebDriver' class AdminRawIdWidgetSeleniumIETests(AdminRawIdWidgetSeleniumFirefoxTests): - webdriver_class = 'selenium.webdriver.ie.webdriver.WebDriver'
\ No newline at end of file + webdriver_class = 'selenium.webdriver.ie.webdriver.WebDriver' |
