Esempio n. 1
0
    def test_delete_user_references_not_sip(self):
        line_sccp_row = self.add_sccpline()
        line_row = self.add_line(protocol='sccp',
                                 protocolid=line_sccp_row.id)

        line_dao.delete_user_references(line_row.id)

        updated_row = (self.session.query(SCCPLineSchema)
                       .get(line_sccp_row.id))

        assert_that(updated_row.cid_name, is_not(equal_to('')))
Esempio n. 2
0
    def test_delete_user_references_sip(self):
        line_sip = self.add_usersip(name='toto',
                                    username='******',
                                    secret='secret',
                                    callerid='"Toto toto <1234>"',
                                    setvar='XIVO_USERID=1')
        line = self.add_line(protocol='sip',
                             protocolid=line_sip.id,
                             name=line_sip.username,
                             context=line_sip.context)

        line_dao.delete_user_references(line.id)

        updated_row = (self.session.query(UserSIPSchema)
                       .filter(UserSIPSchema.id == line_sip.id)
                       .first())

        assert_that(updated_row.callerid, none())
        assert_that(updated_row.setvar, equal_to(''))
Esempio n. 3
0
def remove_caller_id(line_id):
    line_dao.delete_user_references(line_id)
Esempio n. 4
0
def remove_caller_id(line_id):
    line_dao.delete_user_references(line_id)