Skip to content

Commit

Permalink
integration_tests: test_user_callerid: associated/shared caller id pr…
Browse files Browse the repository at this point in the history
…ecedence
  • Loading branch information
DrPyser committed Nov 14, 2024
1 parent 1e3e1ab commit ff784ac
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions integration_tests/suite/base/test_user_callerid.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,23 @@ def test_list_with_shared(phone_number, user):

@fixtures.phone_number(main=True, number='5555551234')
@fixtures.phone_number(shared=True, number='5555551235')
@fixtures.phone_number(shared=True, number='5555551236')
@fixtures.extension(exten='5555551235', context=INCALL_CONTEXT)
@fixtures.incall()
@fixtures.extension(exten='5555556789', context=INCALL_CONTEXT)
@fixtures.incall()
@fixtures.user()
def test_list_with_all_type(
main_number, shared_number, extension, incall, extension2, incall2, user
main_number, shared_number1, shared_number2, extension, incall, user
):
destination = {'type': 'user', 'user_id': user['id']}
confd.incalls(incall['id']).put(destination=destination).assert_updated()
confd.incalls(incall2['id']).put(destination=destination).assert_updated()

with a.incall_extension(incall, extension):
with a.incall_extension(incall2, extension2):
response = confd.users(user['uuid']).callerids.outgoing.get()
response = confd.users(user['uuid']).callerids.outgoing.get()

expected = [
{'type': 'main', 'number': '5555551234'},
{'type': 'shared', 'number': '5555551235'},
{'type': 'associated', 'number': '5555556789'},
{'type': 'associated', 'number': '5555551235'},
{'type': 'shared', 'number': '5555551236'},
{'type': 'anonymous'},
]
assert_that(response.items, contains_inanyorder(*expected))
Expand Down

0 comments on commit ff784ac

Please sign in to comment.