<s> """<STR_LIT>""" <EOL> from pyesgf . security . ats import AttributeService <EOL> from pyesgf . node import ESGFNode <EOL> CEDA_NODE = ESGFNode ( '<STR_LIT>' ) <EOL> def test_ceda_ats ( ) : <EOL> service = AttributeService ( CEDA_NODE . ats_url , '<STR_LIT>' ) <EOL> openid = '<STR_LIT>' <EOL> resp = service . send_request ( openid , [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> assert resp . get_subject ( ) == openid <EOL> attrs = resp . get_attributes ( ) <EOL> assert attrs [ '<STR_LIT>' ] == '<STR_LIT>' <EOL> assert attrs [ '<STR_LIT>' ] == '<STR_LIT>' <EOL> def test_unkown_principal ( ) : <EOL> service = AttributeService ( CEDA_NODE . ats_url , '<STR_LIT>' ) <EOL> openid = '<STR_LIT>' <EOL> resp = service . send_request ( openid , [ ] ) <EOL> assert resp . get_status ( ) == '<STR_LIT>' <EOL> def test_multi_attribute ( ) : <EOL> service = AttributeService ( CEDA_NODE . ats_url , '<STR_LIT>' ) <EOL> openid = '<STR_LIT>' <EOL> resp = service . send_request ( openid , [ '<STR_LIT>' ] ) <EOL> attrs = resp . get_attributes ( ) <EOL> assert list ( sorted ( attrs [ '<STR_LIT>' ] ) ) == [ '<STR_LIT:default>' , '<STR_LIT:user>' ] </s>
