コード例 #1
0
    def test_devicemanagement_router_add_maintenance_window(self, responses):
        responses_callback(responses)

        dmr = DeviceManagementRouter(url, headers, False)
        resp = dmr.add_maintenance_window('Server/TEST', 'TestAddWindow',
                                          '1511290393', '01:00:00')
        assert isinstance(resp, ZenossMaintenanceWindow)
        assert resp.name == "TestAddWindow"
        assert resp.parent == "Devices/Server/TEST"
コード例 #2
0
 def test_devicemanagement_router_add_maintenance_window_bad_days(self):
     dmr = DeviceManagementRouter(url, headers, False)
     with pytest.raises(
             ZenossAPIClientError,
             message="Request failed: Invalid maintenance window days: Bogus"
     ):
         resp = dmr.add_maintenance_window('Server/TEST',
                                           'TestAddWindow',
                                           '1511290393',
                                           '01:00:00',
                                           days='Bogus')