def test_get_forward_dataframes(es): dataframes = es.get_forward_dataframes("log") path_to_sessions = forward_path(es, ["log", "sessions"]) path_to_products = forward_path(es, ["log", "products"]) assert list(dataframes) == [ ("sessions", path_to_sessions), ("products", path_to_products), ]
def test_get_forward_dataframes_deep(es): dataframes = es.get_forward_dataframes("log", deep=True) path_to_sessions = forward_path(es, ["log", "sessions"]) path_to_products = forward_path(es, ["log", "products"]) path_to_customers = forward_path(es, ["log", "sessions", "customers"]) path_to_regions = forward_path(es, ["log", "sessions", "customers", "régions"]) path_to_cohorts = forward_path(es, ["log", "sessions", "customers", "cohorts"]) assert list(dataframes) == [ ("sessions", path_to_sessions), ("customers", path_to_customers), ("cohorts", path_to_cohorts), ("régions", path_to_regions), ("products", path_to_products), ]
def test_get_forward_entities_deep(es): entities = es.get_forward_entities('log', deep=True) path_to_sessions = forward_path(es, ['log', 'sessions']) path_to_products = forward_path(es, ['log', 'products']) path_to_customers = forward_path(es, ['log', 'sessions', 'customers']) path_to_regions = forward_path( es, ['log', 'sessions', 'customers', u'régions']) path_to_cohorts = forward_path(es, ['log', 'sessions', 'customers', 'cohorts']) assert list(entities) == [ ('sessions', path_to_sessions), ('customers', path_to_customers), ('cohorts', path_to_cohorts), (u'régions', path_to_regions), ('products', path_to_products), ]
def test_get_forward_entities(es): entities = es.get_forward_entities('log') path_to_sessions = forward_path(es, ['log', 'sessions']) path_to_products = forward_path(es, ['log', 'products']) assert list(entities) == [('sessions', path_to_sessions), ('products', path_to_products)]