Example #1
0
    def test_dissociate_extension(self):
        exten = '1000'
        context = 'default'
        type = 'user'
        provisioningid = 12

        line_row = self.add_line(context=context,
                                 provisioningid=provisioningid,
                                 number=exten)

        extension_row = self.add_extension(exten=exten,
                                           context=context,
                                           type=type,
                                           typeval=str(line_row.id))

        extension = extension_dao.get(extension_row.id)

        line_dao.dissociate_extension(extension)

        line_row = self.session.query(LineSchema).get(line_row.id)

        self.assertEquals(line_row.number, '')
        self.assertEquals(line_row.context, context)
        self.assertEquals(line_row.provisioningid, provisioningid)
Example #2
0
def remove_exten_and_context(extension):
    line_dao.dissociate_extension(extension)
    extension_dao.dissociate_extension(extension.id)
Example #3
0
def remove_exten_and_context(extension):
    line_dao.dissociate_extension(extension)
    extension_dao.dissociate_extension(extension.id)