@@ -410,17 +410,26 @@ def test_init(self, mocker, stream_view):
410410 stream_view , 'SEARCH_STREAMS' , stream_view .update_streams )
411411
412412 @pytest .mark .parametrize ('new_text, expected_log' , [
413- ('f' , ['FOO' , 'foo' , 'fan' ]),
414- ('foo' , ['FOO' , 'foo' ]),
415- ('FOO' , ['FOO' , 'foo' ]),
413+ ('f' , ['FOO' , 'FOOBAR' , 'foo' , 'fan' ]),
414+ ('a' , ['FOOBAR' , 'fan' , 'bar' ]),
415+ ('bar' , ['FOOBAR' , 'bar' ]),
416+ ('foo' , ['FOO' , 'FOOBAR' , 'foo' ]),
417+ ('FOO' , ['FOO' , 'FOOBAR' , 'foo' ]),
418+ ('test' , ['test here' ]),
419+ ('here' , ['test here' ]),
416420 ])
417421 def test_update_streams (self , mocker , stream_view , new_text , expected_log ):
422+ stream_names = [
423+ 'FOO' , 'FOOBAR' , 'foo' , 'fan' ,
424+ 'boo' , 'BOO' , 'bar' , 'test here' ,
425+ ]
418426 self .view .controller .editor_mode = True
419427 new_text = new_text
420428 search_box = "SEARCH_BOX"
421429 stream_view .streams_btn_list = [
422- mocker .Mock (stream_name = stream_name ) for stream_name in [
423- 'FOO' , 'foo' , 'fan' , 'boo' , 'BOO' ]]
430+ mocker .Mock (stream_name = stream_name )
431+ for stream_name in stream_names
432+ ]
424433 stream_view .update_streams (search_box , new_text )
425434 assert [stream .stream_name for stream in stream_view .log
426435 ] == expected_log
@@ -521,17 +530,26 @@ def test_init(self, mocker, topic_view):
521530 topic_view .topic_search_box ])
522531
523532 @pytest .mark .parametrize ('new_text, expected_log' , [
524- ('f' , ['FOO' , 'foo' , 'fan' ]),
525- ('foo' , ['FOO' , 'foo' ]),
526- ('FOO' , ['FOO' , 'foo' ]),
533+ ('f' , ['FOO' , 'FOOBAR' , 'foo' , 'fan' ]),
534+ ('a' , ['FOOBAR' , 'fan' , 'bar' ]),
535+ ('bar' , ['FOOBAR' , 'bar' ]),
536+ ('foo' , ['FOO' , 'FOOBAR' , 'foo' ]),
537+ ('FOO' , ['FOO' , 'FOOBAR' , 'foo' ]),
538+ ('(no' , ['(no topic)' ]),
539+ ('topic' , ['(no topic)' ]),
527540 ])
528541 def test_update_topics (self , mocker , topic_view , new_text , expected_log ):
542+ topic_names = [
543+ 'FOO' , 'FOOBAR' , 'foo' , 'fan' ,
544+ 'boo' , 'BOO' , 'bar' , '(no topic)' ,
545+ ]
529546 self .view .controller .editor_mode = True
530547 new_text = new_text
531548 search_box = "SEARCH_BOX"
532549 topic_view .topics_btn_list = [
533- mocker .Mock (topic_name = topic_name ) for topic_name in [
534- 'FOO' , 'foo' , 'fan' , 'boo' , 'BOO' ]]
550+ mocker .Mock (topic_name = topic_name )
551+ for topic_name in topic_names
552+ ]
535553 topic_view .update_topics (search_box , new_text )
536554 assert [topic .topic_name for topic in topic_view .log
537555 ] == expected_log
0 commit comments