<s> import datetime <EOL> import testtools <EOL> from openstack . network . v2 import subnet <EOL> IDENTIFIER = '<STR_LIT>' <EOL> EXAMPLE = { <EOL> '<STR_LIT>' : '<STR_LIT:1>' , <EOL> '<STR_LIT>' : '<STR_LIT:2>' , <EOL> '<STR_LIT>' : '<STR_LIT:3>' , <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : '<STR_LIT:5>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:id>' : IDENTIFIER , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:description>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> class TestSubnet ( testtools . TestCase ) : <EOL> def test_basic ( self ) : <EOL> sot = subnet . Subnet ( ) <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> def test_make_it ( self ) : <EOL> sot = subnet . Subnet ( EXAMPLE ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT>' ] , sot . allocation_pools ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT>' ] , sot . cidr ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT>' ] , sot . dns_nameservers ) <EOL> self . assertTrue ( sot . is_dhcp_enabled ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT>' ] , sot . gateway_ip ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT>' ] , sot . host_routes ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT:id>' ] , sot . id ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT>' ] , sot . ip_version ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT>' ] , sot . ipv6_address_mode ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT>' ] , sot . ipv6_ra_mode ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT:name>' ] , sot . name ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT>' ] , sot . network_id ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT>' ] , sot . project_id ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT>' ] , sot . subnet_pool_id ) <EOL> self . assertEqual ( EXAMPLE [ '<STR_LIT:description>' ] , sot . description ) <EOL> dt = datetime . datetime ( <NUM_LIT> , <NUM_LIT:3> , <NUM_LIT:9> , <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:7> , <NUM_LIT:9> , <NUM_LIT:12> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) . replace ( <EOL> tzinfo = None ) <EOL> self . assertEqual ( dt , sot . updated_at . replace ( tzinfo = None ) ) </s>
