Пример #1
0
    def test_event_update_object(self):

        assert isinstance(
            EventUpdate(1).asset_ids.add([]).asset_ids.remove(
                []).description.set("").description.set(None).end_time.set(
                    1).end_time.set(None).external_id.set("1").external_id.set(
                        None).metadata.set({}).source.set(1).source.set(
                            None).start_time.set(1).start_time.set(None),
            EventUpdate,
        )
Пример #2
0
 def test_update_multiple(self, mock_events_response):
     res = EVENTS_API.update([EventUpdate(id=1).description.set("blabla")])
     assert isinstance(res, EventList)
     assert mock_events_response.calls[0].response.json(
     )["items"] == res.dump(camel_case=True)
Пример #3
0
 def test_update_with_update_class(self, mock_events_response):
     res = EVENTS_API.update(EventUpdate(id=1).description.set("blabla"))
     assert isinstance(res, Event)
     assert mock_events_response.calls[0].response.json(
     )["items"][0] == res.dump(camel_case=True)