#NEWLINE# def test_get_adapters_by_system_and_scope( self ) : #NEWLINE# #INDENT# '\n            Get a list of all the adapters in this dhcp scope by system.\n            Should not include systems without a nic.X.ipv4_address.9 value\n        ' #NEWLINE# resp = self . client . get ( reverse ( 'api_v2_keyvalue_get' ) , { #NEWLINE# #INDENT# 'key_type' : 'adapters_by_system_and_scope' , #NEWLINE# 'dhcp_scope' : 'phx-vlan73' , #NEWLINE# 'system' : 'fake-hostname2' , #NEWLINE# #UNINDENT# } , follow = True ) #NEWLINE# self . assertEqual ( resp . status_code , 200 ) #NEWLINE# system_list = json . loads ( resp . content ) #NEWLINE# self . assertEqual ( len ( system_list ) , 2 ) #NEWLINE# '\n            Delete a nic.0.ipv4_address.0 key/value pair\n            There should now only be one adapter available\n        ' #NEWLINE# KeyValue . objects . get ( id = 8 ) . delete ( ) #NEWLINE# resp = self . client . get ( reverse ( 'api_v2_keyvalue_get' ) , { #NEWLINE# #INDENT# 'key_type' : 'adapters_by_system_and_scope' , #NEWLINE# 'dhcp_scope' : 'phx-vlan73' , #NEWLINE# 'system' : 'fake-hostname2' , #NEWLINE# #UNINDENT# } , follow = True ) #NEWLINE# self . assertEqual ( resp . status_code , 200 ) #NEWLINE# system_list = json . loads ( resp . content ) #NEWLINE# self . assertEqual ( len ( system_list ) , 1 )