@test.create_stubs({api.neutron: ('router_create',
                                      'get_feature_permission',)})
    def test_dvr_ha_router_create_post(self):
        router = self.routers.first()
        api.neutron.get_feature_permission(IsA(http.HttpRequest),
                                           "dvr", "create")\
            .MultipleTimes().AndReturn(True)
        api.neutron.get_feature_permission(IsA(http.HttpRequest),
                                           "l3-ha", "create")\
            .MultipleTimes().AndReturn(True)
        param = {'name': router.name,
                 'distributed': True,
                 'ha': True}
        api.neutron.router_create(IsA(http.HttpRequest), **param)\
            .AndReturn(router)

        self.mox.ReplayAll()
        form_data = {'name': router.name,
                     'mode': 'distributed',
                     'ha': 'enabled'}
        url = reverse(self.DASHBOARD % 'horizon:%s:routers:create')
        res = self.client.post(url, form_data)

        self.assertNoFormErrors(res)
        self.assertRedirectsNoFollow(res, self.INDEX_URL)
dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/dashboards/project/routers/tests.py/RouterActionTests.test_dvr_ha_router_create_post/swapped operands of `%`