<s> import datetime <EOL> import testtools <EOL> from openstack . cluster . v1 import profile <EOL> FAKE_ID = '<STR_LIT>' <EOL> FAKE_NAME = '<STR_LIT>' <EOL> FAKE = { <EOL> '<STR_LIT>' : { } , <EOL> '<STR_LIT:name>' : FAKE_NAME , <EOL> '<STR_LIT:id>' : FAKE_ID , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT:type>' : '<STR_LIT>' , <EOL> '<STR_LIT:version>' : <NUM_LIT:1.0> , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : <NUM_LIT:1> , <EOL> '<STR_LIT:image>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:name>' : '<STR_LIT>' <EOL> } <EOL> } , <EOL> '<STR_LIT:type>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> class TestProfile ( testtools . TestCase ) : <EOL> def setUp ( self ) : <EOL> super ( TestProfile , self ) . setUp ( ) <EOL> def test_basic ( self ) : <EOL> sot = profile . Profile ( ) <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_create ) <EOL> self . assertTrue ( sot . allow_retrieve ) <EOL> self . assertTrue ( sot . allow_update ) <EOL> self . assertTrue ( sot . allow_delete ) <EOL> self . assertTrue ( sot . allow_list ) <EOL> self . assertTrue ( sot . patch_update ) <EOL> def test_instantiate ( self ) : <EOL> sot = profile . Profile ( FAKE ) <EOL> self . assertEqual ( FAKE [ '<STR_LIT:id>' ] , sot . id ) <EOL> self . assertEqual ( FAKE [ '<STR_LIT:name>' ] , sot . name ) <EOL> self . assertEqual ( FAKE [ '<STR_LIT>' ] , sot . metadata ) <EOL> self . assertEqual ( FAKE [ '<STR_LIT>' ] , sot . spec ) <EOL> self . assertEqual ( FAKE [ '<STR_LIT:type>' ] , sot . type_name ) <EOL> dt = datetime . datetime ( <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:10> , <NUM_LIT:12> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) . replace ( <EOL> tzinfo = None ) <EOL> self . assertEqual ( dt , sot . created_at . replace ( tzinfo = None ) ) <EOL> dt = datetime . datetime ( <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:10> , <NUM_LIT:12> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) . replace ( <EOL> tzinfo = None ) <EOL> self . assertEqual ( dt , sot . updated_at . replace ( tzinfo = None ) ) </s>
