#NEWLINE# @ mock_ec2 #NEWLINE# def test_elastic_network_interfaces_subnet_validation( ) : #NEWLINE# #INDENT# conn = boto . connect_vpc ( 'the_key' , 'the_secret' ) #NEWLINE# with assert_raises ( EC2ResponseError ) as cm : #NEWLINE# #INDENT# conn . create_network_interface ( 'subnet-abcd1234' ) #NEWLINE# #UNINDENT# cm . exception . code . should . equal ( 'InvalidSubnetID.NotFound' ) #NEWLINE# cm . exception . status . should . equal ( 400 ) #NEWLINE# conn . exception . request_id . should_not . be . none