<s> from graphql . core . execution . middlewares . utils import ( merge_resolver_tags , <EOL> resolver_has_tag , <EOL> tag_resolver ) <EOL> def test_tag_resolver ( ) : <EOL> resolver = lambda : None <EOL> tag_resolver ( resolver , '<STR_LIT:test>' ) <EOL> assert resolver_has_tag ( resolver , '<STR_LIT:test>' ) <EOL> assert not resolver_has_tag ( resolver , '<STR_LIT>' ) <EOL> def test_merge_resolver_tags ( ) : <EOL> a = lambda : None <EOL> b = lambda : None <EOL> tag_resolver ( a , '<STR_LIT:a>' ) <EOL> tag_resolver ( b , '<STR_LIT:b>' ) <EOL> merge_resolver_tags ( a , b ) <EOL> assert resolver_has_tag ( a , '<STR_LIT:a>' ) <EOL> assert not resolver_has_tag ( a , '<STR_LIT:b>' ) <EOL> assert resolver_has_tag ( b , '<STR_LIT:a>' ) <EOL> assert resolver_has_tag ( b , '<STR_LIT:b>' ) <EOL> def test_resolver_has_tag_with_untagged_resolver ( ) : <EOL> a = lambda : None <EOL> assert not resolver_has_tag ( a , '<STR_LIT>' ) <EOL> def test_merge_resolver_from_untagged_source ( ) : <EOL> a = lambda : None <EOL> b = lambda : None <EOL> merge_resolver_tags ( a , b ) <EOL> assert not hasattr ( b , '<STR_LIT>' ) <EOL> def test_merge_resolver_to_untagged_target ( ) : <EOL> a = lambda : None <EOL> b = lambda : None <EOL> tag_resolver ( a , '<STR_LIT:test>' ) <EOL> merge_resolver_tags ( a , b ) <EOL> assert resolver_has_tag ( b , '<STR_LIT:test>' ) </s>
