<s> from dal . test import case , stories <EOL> from dal_select2 . test import Select2Story <EOL> from taggit . models import Tag <EOL> from . models import TestModel <EOL> class TagSelect2AdminTestMixin ( Select2Story , case . AdminMixin ) : <EOL> def setUp ( self ) : <EOL> super ( TagSelect2AdminTestMixin , self ) . setUp ( ) <EOL> self . get ( url = self . get_modeladmin_url ( '<STR_LIT>' ) ) <EOL> self . fill_name ( ) <EOL> def test_can_select_options ( self ) : <EOL> labels = [ self . id ( ) + '<STR_LIT:0>' , self . id ( ) + '<STR_LIT:1>' ] <EOL> self . tag_model . objects . create ( name = labels [ <NUM_LIT:0> ] ) <EOL> story = stories . SelectOptionMultiple ( self ) <EOL> for option in labels : <EOL> story . select_option ( option ) <EOL> story . assert_labels ( labels ) <EOL> story . assert_values ( labels ) <EOL> story . submit ( ) <EOL> story . assert_labels ( labels ) <EOL> story . assert_values ( labels ) <EOL> class TaggitSelect2AdminTest ( TagSelect2AdminTestMixin , <EOL> case . AutocompleteTestCase ) : <EOL> field_name = '<STR_LIT:test>' <EOL> inline_related_name = '<STR_LIT>' <EOL> model = TestModel <EOL> tag_model = Tag </s>
