<s> import testtools <EOL> from openstack . cluster . v1 import policy_type <EOL> FAKE = { <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT:foo>' : '<STR_LIT:bar>' <EOL> } <EOL> } <EOL> class TestPolicyType ( testtools . TestCase ) : <EOL> def test_basic ( self ) : <EOL> sot = policy_type . PolicyType ( ) <EOL> self . assertEqual ( '<STR_LIT:name>' , sot . id_attribute ) <EOL> self . assertEqual ( '<STR_LIT>' , sot . resource_key ) <EOL> self . assertEqual ( '<STR_LIT>' , sot . resources_key ) <EOL> self . assertEqual ( '<STR_LIT>' , sot . base_path ) <EOL> self . assertEqual ( '<STR_LIT>' , sot . service . service_type ) <EOL> self . assertTrue ( sot . allow_retrieve ) <EOL> self . assertTrue ( sot . allow_list ) <EOL> def test_instantiate ( self ) : <EOL> sot = policy_type . PolicyType ( FAKE ) <EOL> self . assertEqual ( FAKE [ '<STR_LIT:name>' ] , sot . id ) <EOL> self . assertEqual ( FAKE [ '<STR_LIT:name>' ] , sot . name ) <EOL> self . assertEqual ( FAKE [ '<STR_LIT>' ] , sot . schema ) </s>
