#NEWLINE# @ mock_ec2 #NEWLINE# def test_dhcp_options_get_by_value_filter( ) : #NEWLINE# #INDENT# ec2 = boto3 . resource ( 'ec2' , region_name = 'us-west-1' ) #NEWLINE# ec2 . create_dhcp_options ( DhcpConfigurations = [ { #NEWLINE# #INDENT# 'Key' : 'domain-name' , #NEWLINE# 'Values' : [ 'example.com' ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'Key' : 'domain-name-servers' , #NEWLINE# 'Values' : [ '10.0.10.2' ] , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# ec2 . create_dhcp_options ( DhcpConfigurations = [ { #NEWLINE# #INDENT# 'Key' : 'domain-name' , #NEWLINE# 'Values' : [ 'example.com' ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'Key' : 'domain-name-servers' , #NEWLINE# 'Values' : [ '10.0.20.2' ] , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# ec2 . create_dhcp_options ( DhcpConfigurations = [ { #NEWLINE# #INDENT# 'Key' : 'domain-name' , #NEWLINE# 'Values' : [ 'example.com' ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'Key' : 'domain-name-servers' , #NEWLINE# 'Values' : [ '10.0.30.2' ] , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# filters = [ { #NEWLINE# #INDENT# 'Name' : 'value' , #NEWLINE# 'Values' : [ '10.0.10.2' ] , #NEWLINE# #UNINDENT# } ] #NEWLINE# dhcp_options_sets = list ( ec2 . dhcp_options_sets . filter ( Filters = dhcp_options_sets ) ) #NEWLINE# dhcp_options_sets . should . have . length_of ( 1 )