<s> from openstack import exceptions <EOL> from openstack import profile <EOL> from openstack . tests . unit import base <EOL> class TestProfile ( base . TestCase ) : <EOL> def test_init ( self ) : <EOL> prof = profile . Profile ( ) <EOL> expected = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT:image>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] <EOL> self . assertEqual ( expected , prof . service_keys ) <EOL> def test_set ( self ) : <EOL> prof = profile . Profile ( ) <EOL> prof . set_version ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , prof . get_filter ( '<STR_LIT>' ) . version ) <EOL> prof . set_version ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , prof . get_filter ( '<STR_LIT>' ) . version ) <EOL> prof . set_version ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , prof . get_filter ( '<STR_LIT>' ) . version ) <EOL> prof . set_version ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , prof . get_filter ( '<STR_LIT>' ) . version ) <EOL> prof . set_version ( '<STR_LIT:image>' , '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , prof . get_filter ( '<STR_LIT:image>' ) . version ) <EOL> prof . set_version ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , prof . get_filter ( '<STR_LIT>' ) . version ) <EOL> prof . set_version ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , prof . get_filter ( '<STR_LIT>' ) . version ) <EOL> prof . set_version ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , prof . get_filter ( '<STR_LIT>' ) . version ) <EOL> prof . set_version ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , prof . get_filter ( '<STR_LIT>' ) . version ) <EOL> def test_set_version_bad_service ( self ) : <EOL> prof = profile . Profile ( ) <EOL> self . assertRaises ( exceptions . SDKException , prof . set_version , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> def test_set_all ( self ) : <EOL> prof = profile . Profile ( ) <EOL> prof . set_name ( prof . ALL , '<STR_LIT>' ) <EOL> prof . set_region ( prof . ALL , '<STR_LIT>' ) <EOL> prof . set_interface ( prof . ALL , '<STR_LIT>' ) <EOL> for service in prof . service_keys : <EOL> self . assertEqual ( '<STR_LIT>' , prof . get_filter ( service ) . service_name ) <EOL> self . assertEqual ( '<STR_LIT>' , prof . get_filter ( service ) . region ) <EOL> self . assertEqual ( '<STR_LIT>' , prof . get_filter ( service ) . interface ) </s>
