コード例 #1
0
ファイル: test_services.py プロジェクト: jaunis/xivo-dao
    def test_associate_line_to_device(self, line_dao_edit, link_device_config, rebuild_device_config):
        device = Device(id=self.device_id)
        line = LineSIP()

        device_services.associate_line_to_device(device, line)

        line_dao_edit.assert_called_once_with(line)
        link_device_config.assert_called_once_with(device)
        rebuild_device_config.assert_called_once_with(device)
        self.assertEquals(line.device_id, self.device_id)
コード例 #2
0
    def test_associate_line_to_device(self, line_dao_edit, link_device_config,
                                      rebuild_device_config):
        device = Device(id=self.device_id)
        line = LineSIP()

        device_services.associate_line_to_device(device, line)

        line_dao_edit.assert_called_once_with(line)
        link_device_config.assert_called_once_with(device)
        rebuild_device_config.assert_called_once_with(device)
        self.assertEquals(line.device_id, self.device_id)
コード例 #3
0
ファイル: actions.py プロジェクト: jaunis/xivo-restapi
def associate_line(deviceid, lineid):
    device = device_services.get(deviceid)
    line = line_services.get(lineid)
    device_services.associate_line_to_device(device, line)
    return make_response('', 204)
コード例 #4
0
ファイル: actions.py プロジェクト: jaunis/xivo-restapi
def associate_line(deviceid, lineid):
    device = device_services.get(deviceid)
    line = line_services.get(lineid)
    device_services.associate_line_to_device(device, line)
    return make_response('', 204)