Exemplo n.º 1
0
    def test_events_router_get_details_by_evid(self, responses):
        responses_callback(responses)

        er = EventsRouter(url, headers, True)
        resp = er._get_details_by_evid("02420a11-0015-98b9-11e7-9d96ae351999")
        assert resp['agent'] == "zenpython"
        assert resp['device_uuid'] == "02e21618-b30a-47bf-8591-471c70570932"
Exemplo n.º 2
0
    def test_events_router_get_details_by_evid_not_found(self, responses):
        responses_callback(responses)

        er = EventsRouter(url, headers, True)
        with pytest.raises(
                ZenossAPIClientError,
                message="Request failed: ServiceResponseError: Not Found"):
            resp = er._get_details_by_evid(
                "02420a11-0015-98b9-11e7-9d96ae35199f")