"""Common test configuration for handlers.""" import itertools import pytest from analytics.models.streams import Store _ALL_STORES = (Store.APPLE_MUSIC, Store.SPOTIFY, Store.AMAZON_MUSIC) @pytest.fixture(name='all_stores') def get_all_stores(): """Return list of all existing stores.""" return list(_ALL_STORES) @pytest.fixture(name='valid_stores', params=list(itertools.chain( *(itertools.combinations(_ALL_STORES, i) for i in range(len(_ALL_STORES) + 1))))) def get_valid_stores(request): """Create all combinations of valid stores, including the empty one.""" return list(request.param)