And the reason the test passed is it mocked the router object returned:
routers_db = [{ 'id': uuidutils.generate_uuid(), 'external_gateways': [{'network_id': ext_net_id}]}]
So it essentially had the valid key.
This is one of the drawbacks of unit tests.
And the reason the test passed is it mocked the router object returned:
routers_db = [{ generate_ uuid(),
'external_ gateways' : [{'network_id': ext_net_id}]}]
'id': uuidutils.
So it essentially had the valid key.
This is one of the drawbacks of unit tests.