#NEWLINE# def test_ip4_send( client , site ) : #NEWLINE# #INDENT# 'Test upstream write actions for IPv4' #NEWLINE# site_id = site [ 'id' ] #NEWLINE# subnet = Network ( client = client , site_id = site_id , cidr = '254.0.0.0/24' ) #NEWLINE# host = Network ( client = client , site_id = site_id , cidr = '254.0.0.1/32' ) #NEWLINE# assert subnet . purge ( ) #NEWLINE# assert ( not subnet . exists ( ) ) #NEWLINE# assert subnet . ensure ( ) #NEWLINE# assert subnet . exists ( ) #NEWLINE# assert host . purge ( ) #NEWLINE# assert ( not host . exists ( ) ) #NEWLINE# assert host . ensure ( ) #NEWLINE# assert host . exists ( ) #NEWLINE# host . purge ( ) #NEWLINE# subnet . purge ( ) #NEWLINE# assert ( not all ( [ subnet . exists ( ) , host . exists ( ) ] ) )