<s> import mock <EOL> from neutron . agent . linux import pd <EOL> from neutron . tests import base as tests_base <EOL> class FakeRouter ( object ) : <EOL> def __init__ ( self , router_id ) : <EOL> self . router_id = router_id <EOL> class TestPrefixDelegation ( tests_base . DietTestCase ) : <EOL> def test_remove_router ( self ) : <EOL> l3_agent = mock . Mock ( ) <EOL> router_id = <NUM_LIT:1> <EOL> l3_agent . pd . routers = { router_id : pd . get_router_entry ( None ) } <EOL> pd . remove_router ( None , None , l3_agent , router = FakeRouter ( router_id ) ) <EOL> self . assertTrue ( l3_agent . pd . delete_router_pd . called ) <EOL> self . assertEqual ( { } , l3_agent . pd . routers ) </s>
