@@ -84,6 +84,14 @@ def setUpClass(cls):
8484 country = 'Burkina Faso' ,
8585 )
8686 )
87+ cls .publishers .append (
88+ factories .PublisherFactory (
89+ name = 'Strip Books of America' ,
90+ city = 'Chelmsford' ,
91+ state_province = 'South East' ,
92+ country = 'Burkina Faso' ,
93+ )
94+ )
8795 cls .publishers .append (
8896 factories .PublisherFactory (
8997 name = 'Book Works' ,
@@ -140,6 +148,17 @@ def setUpClass(cls):
140148 publisher__country = 'Armenia' ,
141149 )
142150 )
151+ cls .books .append (
152+ factories .BookFactory (
153+ title = 'Eeeee Ffff' ,
154+ summary = 'He took his vorpal sword in his hand,'
155+ 'Long time the manxome foe he sought --'
156+ 'So rested he by the Tumtum tree,'
157+ 'And stood awhile in thought.' ,
158+ publisher__name = 'Strip Books of America' ,
159+ publisher__country = 'Burkina Faso' ,
160+ )
161+ )
143162
144163 cls .books += factories .BookFactory .create_batch (
145164 10 ,
@@ -223,6 +242,14 @@ def test_suggesters_completion(self):
223242 'Ad' : ['Addison–Wesley' , 'Adis International' ],
224243 'Atl' : ['Atlantic Books' , 'Atlas Press' ],
225244 'Boo' : ['Book League of America' , 'Book Works' , 'Booktrope' ],
245+ 'Stri' : ['Strip Books of America' ],
246+ },
247+ 'name_match_suggest__completion_match' : {
248+ 'Strip' : ['Strip Books of America' , ],
249+ 'America' : [
250+ 'Strip Books of America' ,
251+ 'Book League of America' ,
252+ ],
226253 },
227254 'country_suggest__completion_prefix' : {
228255 'Arm' : ['Armenia' ],
@@ -237,6 +264,8 @@ def test_suggesters_completion(self):
237264 test_data .update (
238265 {
239266 'name_suggest' : test_data ['name_suggest__completion_prefix' ],
267+ 'name_match_suggest' :
268+ test_data ['name_match_suggest__completion_match' ],
240269 'country_suggest' :
241270 test_data ['country_suggest__completion_prefix' ],
242271 }
0 commit comments