def test_delete(self):
        dialpattern = self.add_dialpattern()

        deleted_rows_count = dialpattern_dao.delete(dialpattern.id)

        row = self.session.query(DialPattern).filter(DialPattern.id == dialpattern.id).first()

        self.assertEquals(deleted_rows_count, 1)
        self.assertEquals(row, None)
    def test_delete(self):
        dialpattern = self.add_dialpattern()

        deleted_rows_count = dialpattern_dao.delete(dialpattern.id)

        row = self.session.query(DialPattern).filter(
            DialPattern.id == dialpattern.id).first()

        self.assertEquals(deleted_rows_count, 1)
        self.assertEquals(row, None)
Exemple #3
0
def _delete(channel, dialpattern_id):
    from xivo_dao import dialpattern_dao

    dialpattern_dao.delete(dialpattern_id)
 def test_delete_unexisting_dialpattern(self):
     result = dialpattern_dao.delete(1)
     self.assertEqual(result, 0)
 def test_delete_unexisting_dialpattern(self):
     result = dialpattern_dao.delete(1)
     self.assertEqual(result, 0)