@test.create_stubs({api.neutron: ('network_list',)})
    def test_routerrule_detail(self):
        router = self.routers_with_rules.first()
        if self.DASHBOARD == 'project':
            api.neutron.network_list(
                IsA(http.HttpRequest),
                shared=False,
                tenant_id=router['tenant_id']).AndReturn(self.networks.list())
            api.neutron.network_list(
                IsA(http.HttpRequest),
                shared=True).AndReturn([])
        res = self._get_detail(router)

        self.assertTemplateUsed(res, self.DASHBOARD % '%s/routers/detail.html')
        if self.DASHBOARD == 'project':
            self.assertTemplateUsed(
                res,
                '%s/routers/extensions/routerrules/grid.html' % self.DASHBOARD)
        rules = res.context['routerrules_table'].data
        self.assertItemsEqual(rules, router['router_rules'])
dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/dashboards/project/routers/tests.py/RouterRuleTests.test_routerrule_detail/swapped operands of `%`