Unexcepted method call error when running the horizon unit test

asked 2015-08-28 03:54:35 -0600

sanjana gravatar image
class AlarmsViewTests(test.BaseAdminViewTests):
    @test.create_stubs({api.ceilometer: ('alarm_list',),})
    def test_index(self):
        api.ceilometer.alarm_list(IsA(http.HttpRequest), None) \
            .AndReturn(self.alarms.list())
        self.mox.ReplayAll()
        pdb.set_trace()
        res = self.client.get(reverse(constants.ALARMS_INDEX_URL))
        self.assertTemplateUsed(res, constants.ALARMS_TEMPLATE_NAME)
        self.assertItemsEqual(res.context['table'].data, self.alarms.list())

after the self.client.get() i get the error. ALARMS_INDEX_URL is correctly defined

edit retag flag offensive close merge delete