8cf94ebe0d
test_router_add_interface_subnet_with_port_from_other_tenant in neutron.tests.unit.test_l3_plugin.L3NatTestCaseBase was mocking neutron.context.Context thus performing multiple API requests with the same context instance. As a context instance also has a DB session attribute, this might cause unexpected side effects, especially for plugins which process request asynchronously. The plugin neutron.plugins.nicira.NeutronServicePlugin was being affected. This patch ensures each request has a different context object without changing the unit test semantics. It also refactors slightly test_edge_router.py in the nicira unit test package to avoid executing twice the same unit tests. Change-Id: I4895faa00ebd915eb9e259930db2d004a9e78a86 Closes-Bug: #1280035