Exemplo n.º 1
0
    def test_delete_unassociated(self, device_dao_delete, line_dao_reset_device, device_notifier_deleted):
        device = Device(id=self.device_id,
                        ip='10.0.0.1')

        device_services.delete(device)

        device_dao_delete.assert_called_once_with(device)
        line_dao_reset_device.assert_called_once_with(device.id)
        device_notifier_deleted.assert_called_once_with(device)
Exemplo n.º 2
0
    def test_delete_unassociated(self, device_dao_delete,
                                 line_dao_reset_device,
                                 device_notifier_deleted):
        device = Device(id=self.device_id, ip='10.0.0.1')

        device_services.delete(device)

        device_dao_delete.assert_called_once_with(device)
        line_dao_reset_device.assert_called_once_with(device.id)
        device_notifier_deleted.assert_called_once_with(device)
Exemplo n.º 3
0
def delete(deviceid):
    device = device_services.get(deviceid)
    device_services.delete(device)
    return make_response('', 204)
Exemplo n.º 4
0
def delete(deviceid):
    device = device_services.get(deviceid)
    device_services.delete(device)
    return make_response('', 204)