@@ -20,7 +20,7 @@ def test_get(self, client, artists):
20
20
artist = artists [0 ]
21
21
form = AlbumModelSelect2WidgetForm ()
22
22
assert form .as_p ()
23
- field_id = form .fields ['artist' ].widget .widget_id
23
+ field_id = form .fields ['artist' ].widget .field_id
24
24
url = reverse ('django_select2:auto-json' )
25
25
response = client .get (url , {'field_id' : field_id , 'term' : artist .title })
26
26
assert response .status_code == 200
@@ -55,7 +55,7 @@ def test_pagination(self, genres, client):
55
55
search_fields = ['title__icontains' ]
56
56
)
57
57
widget .render ('name' , None )
58
- field_id = widget .widget_id
58
+ field_id = widget .field_id
59
59
60
60
response = client .get (url , {'field_id' : field_id , 'term' : '' })
61
61
assert response .status_code == 200
@@ -76,7 +76,7 @@ def test_label_from_instance(self, artists, client):
76
76
form = AlbumModelSelect2WidgetForm ()
77
77
form .fields ['artist' ].widget = ArtistCustomTitleWidget ()
78
78
assert form .as_p ()
79
- field_id = form .fields ['artist' ].widget .widget_id
79
+ field_id = form .fields ['artist' ].widget .field_id
80
80
81
81
artist = artists [0 ]
82
82
response = client .get (url , {'field_id' : field_id , 'term' : artist .title })
@@ -90,7 +90,7 @@ def test_url_check(self, client, artists):
90
90
artist = artists [0 ]
91
91
form = AlbumModelSelect2WidgetForm ()
92
92
assert form .as_p ()
93
- field_id = form .fields ['artist' ].widget .widget_id
93
+ field_id = form .fields ['artist' ].widget .field_id
94
94
cache_key = form .fields ['artist' ].widget ._get_cache_key ()
95
95
widget_dict = cache .get (cache_key )
96
96
widget_dict ['url' ] = 'yet/another/url'
0 commit comments