def test_delete(self): line_row = self.add_line() line_dao.delete(line_row) deleted_line = self.session.query(Line).get(line_row.id) assert_that(deleted_line, none())
def test_given_line_has_custom_endpoint_when_deleting_then_custom_endpoint_deleted(self): custom_row = self.add_usercustom() line_row = self.add_line(endpoint_custom_id=custom_row.id) line_dao.delete(line_row) deleted_custom = self.session.query(UserCustom).get(custom_row.id) assert_that(deleted_custom, none())
def test_given_line_has_sccp_endpoint_when_deleting_then_sccp_endpoint_deleted(self): sccpline_row = self.add_sccpline() line_row = self.add_line(endpoint_sccp_id=sccpline_row.id) line_dao.delete(line_row) deleted_sccp = self.session.query(SCCPLine).get(sccpline_row.id) assert_that(deleted_sccp, none())
def test_given_line_has_sip_endpoint_when_deleting_then_sip_endpoint_deleted(self): endpoint_sip = self.add_endpoint_sip() line_row = self.add_line(endpoint_sip_uuid=endpoint_sip.uuid) line_dao.delete(line_row) deleted_endpoint_sip = self.session.query(EndpointSIP).get(endpoint_sip.uuid) assert_that(deleted_endpoint_sip, none())
def test_given_line_has_custom_endpoint_when_deleting_then_custom_endpoint_deleted(self): custom_row = self.add_usercustom() line_row = self.add_line(protocol='custom', protocolid=custom_row.id) line_dao.delete(line_row) deleted_custom = self.session.query(UserCustom).get(custom_row.id) assert_that(deleted_custom, none())
def test_given_line_has_sccp_endpoint_when_deleting_then_sccp_endpoint_deleted(self): sccpline_row = self.add_sccpline() line_row = self.add_line(protocol='sccp', protocolid=sccpline_row.id) line_dao.delete(line_row) deleted_sccp = self.session.query(SCCPLine).get(sccpline_row.id) assert_that(deleted_sccp, none())
def test_given_line_has_sip_endpoint_when_deleting_then_sip_endpoint_deleted(self): usersip_row = self.add_usersip() line_row = self.add_line(protocol='sip', protocolid=usersip_row.id) line_dao.delete(line_row) deleted_sip = self.session.query(UserSIP).get(usersip_row.id) assert_that(deleted_sip, none())
def delete(line): dao.delete(line) _update_device(line) notifier.deleted(line)