Commit 0ff07fd0 authored by Francois Blackburn's avatar Francois Blackburn

outcall: remove unused function exists

parent a8884120
......@@ -19,7 +19,6 @@
from .persistor import OutcallPersistor
from .search import outcall_search
from xivo_dao.alchemy.outcall import Outcall
from xivo_dao.helpers.db_manager import daosession
......@@ -66,13 +65,3 @@ def edit(session, outcall):
@daosession
def delete(session, outcall):
OutcallPersistor(session, outcall_search).delete(outcall)
# TODO: DELETE
@daosession
def exists(session, outcall_id):
query = (session.query(Outcall)
.filter(Outcall.id == outcall_id)
)
return query.count() > 0
......@@ -454,18 +454,3 @@ class TestDelete(DAOTestCase):
extension = self.session.query(Extension).first()
assert_that(extension, none())
class TestGroupExist(DAOTestCase):
def test_given_no_outcall_then_returns_false(self):
result = outcall_dao.exists(1)
assert_that(result, equal_to(False))
def test_given_outcall_exists_then_return_true(self):
outcall_row = self.add_outcall()
result = outcall_dao.exists(outcall_row.id)
assert_that(result, equal_to(True))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment