Rename API and fix tests

This commit is contained in:
Tim 2020-10-11 15:49:05 +01:00
parent 6ea2025888
commit 2ddcbe63bb
No known key found for this signature in database
GPG Key ID: 3D454289AF831A6D
2 changed files with 4 additions and 4 deletions

View File

@ -31,9 +31,9 @@ controller_views = Blueprint('controller', __name__)
log = logging.getLogger(__name__)
@controller_views.route('/live-item')
def controller_text_api():
log.debug('controller-v2-live-item')
@controller_views.route('/live-items')
def controller_live_items():
log.debug('controller-v2-live-items')
live_controller = Registry().get('live_controller')
current_item = live_controller.service_item
live_item = {}

View File

@ -36,7 +36,7 @@ def test_retrieve_live_item(flask_client, settings):
Registry().register('live_controller', fake_live_controller)
# WHEN: The live-item endpoint is called
res = flask_client.get('/api/v2/controller/live-item').get_json()
res = flask_client.get('/api/v2/controller/live-items').get_json()
# THEN: The correct item data should be returned
assert res == {'slides': [{'selected': True}]}