mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Add _source_model url param to test.
This commit is contained in:
parent
2410ace701
commit
8879a800bb
@ -944,6 +944,7 @@ class RelatedFieldWidgetWrapperTests(SimpleTestCase):
|
|||||||
self.assertIn("<a ", output)
|
self.assertIn("<a ", output)
|
||||||
|
|
||||||
def test_data_model_ref_when_model_name_is_camel_case(self):
|
def test_data_model_ref_when_model_name_is_camel_case(self):
|
||||||
|
self.maxDiff = None
|
||||||
rel = VideoStream._meta.get_field("release_event").remote_field
|
rel = VideoStream._meta.get_field("release_event").remote_field
|
||||||
widget = forms.Select()
|
widget = forms.Select()
|
||||||
wrapper = widgets.RelatedFieldWidgetWrapper(widget, rel, widget_admin_site)
|
wrapper = widgets.RelatedFieldWidgetWrapper(widget, rel, widget_admin_site)
|
||||||
@ -958,7 +959,7 @@ class RelatedFieldWidgetWrapperTests(SimpleTestCase):
|
|||||||
</select>
|
</select>
|
||||||
<a class="related-widget-wrapper-link add-related" id="add_id_stream"
|
<a class="related-widget-wrapper-link add-related" id="add_id_stream"
|
||||||
data-popup="yes" title="Add another release event"
|
data-popup="yes" title="Add another release event"
|
||||||
href="/admin_widgets/releaseevent/add/?_to_field=album&_popup=1">
|
href="/admin_widgets/releaseevent/add/?_to_field=album&_popup=1&_source_model=VideoStream">
|
||||||
<img src="/static/admin/img/icon-addlink.svg" alt="" width="24" height="24">
|
<img src="/static/admin/img/icon-addlink.svg" alt="" width="24" height="24">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user