#NEWLINE# def test_get_links( self ) : #NEWLINE# #INDENT# '\n        Tests that the links are retrieved correctly from the FV.\n        ' #NEWLINE# from openflow.optin_manager.dummyfv.models import DummyFVLink #NEWLINE# links = wrap_xmlrpc_call ( self . om_client . get_links , [ ] , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , TIMEOUT ) #NEWLINE# links = set ( [ tuple ( l [ : ( - 1 ) ] ) for l in links ] ) #NEWLINE# expected = set ( [ ( link . src_dev . dpid , link . src_port , link . dst_dev . dpid , link . dst_port ) for link in DummyFVLink . objects . all ( ) ] ) #NEWLINE# self . assertTrue ( links . issubset ( expected ) , ( 'Received links have %s not in expected links' % ( ( links - expected ) , ) ) ) #NEWLINE# self . assertTrue ( expected . issubset ( links ) , ( 'Expected links have %s not in received links' % ( ( expected - links ) , ) ) )