import json import os import pytest from flask import current_app @pytest.fixture def client(): current_app.config['TESTING'] = True with current_app.test_client() as client: yield client def test_response_length(client): data = { "uuid": os.environ["LOCAL_UUID"], "message": "Hello There!" } r = client.get('/consumers', data = json.dumps(data)) assert len(r) == 0