def test_metafilter_resource_type_article_abs(): COUNT = 3 request = req.RecsRequest(site_id='3c499a166380645f83154eb95983ed96', bsin='d3555efd-fc91-418c-a566-25c20ca31212', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) td = timedelta(days=-2).total_seconds() metafilter = recs_filter.TFilter(overlap=None, recency=None, and_=[ recs_filter.TFilter(overlap=None, recency=None, and_=None, existence=None, or_=None, named='GLOBAL', range=None) ], existence=None, or_=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': HOST, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='91933fc8a01955af78eb1faeec0000ba', bsin='8a995241-eeac-49eb-b845-c3ae4b874a43', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter(existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter(amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None)], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_metafilter_resource_type_article(customer_name, site_id): request = req.RecsRequest(site_id=site_id, bsin=BSIN, seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter(overlap=None, recency=None, and_=[ recs_filter.TFilter(overlap=None, recency=None, and_=None, existence=None, or_=None, named='GLOBAL', range=None) ], existence=None, or_=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': HOST, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='06e78e216c45bfd35dc02c82f0da2ceb', bsin='7218a49b-3c97-4a2a-a880-383841a4cd85', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter(existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter(amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None)], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='roll-call', bsin='de2fb381-767f-4b73-a519-eb66013dbfbe', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter(overlap=None, recency=None, and_=[ recs_filter.TFilter(overlap=None, recency=None, and_=None, existence=None, or_=None, named='GLOBAL', range=None) ], existence=None, or_=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_group_metafilter(customer_name, site_id): request = req.RecsRequest(site_id=site_id, bsin=BSIN, seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) # metafilter = recs_filter.TFilter(overlap=None, recency=None, and_=[ # recs_filter.TFilter(overlap=None, recency=None, and_=None, existence=None, or_=None, named='GLOBAL', range=None), # recs_filter.TFilter(overlap=recs_filter.TOverlapFilter(values=['thegazette_default'], field='resource-type', amount=recs_filter.TRange(min_=1.0, max_=None), # match_type=0), recency=None, and_=None, existence=None, or_=None, named=None, range=None) # ], existence=None, or_=None, named=None, range=None) # # request.groups['thegazette_default'] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) metafilter = recs_filter.TFilter(overlap=None, recency=None, and_=[ recs_filter.TFilter(overlap=None, recency=None, and_=None, existence=None, or_=None, named='GLOBAL', range=None), recs_filter.TFilter(overlap=recs_filter.TOverlapFilter(values=['thegazette_sports'], field='resource-type', amount=recs_filter.TRange(min_=1.0, max_=None), match_type=0), recency=None, and_=None, existence=None, or_=None, named=None, range=None) ], existence=None, or_=None, named=None, range=None) request.groups['thegazette_sports'] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': HOST, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): request = req.RecsRequest(site_id='8bf9fa832a2cf351cf1a19098038459d', bsin=BSIN, seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=recs_filter.TRecencyFilter( range=recs_filter.TRange(min_=-604800.0, max_=None), field='pubDate'), overlap=None, any=None, named=None, range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=1.0, max_=None), values=['article_alist'], field='resource-type', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups['articles'] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): request = req.RecsRequest(site_id='wide-open-eats', bsin='e29221c2-e1e5-4a8e-a28d-6a2f267552c6', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) COUNT1 = 1 metafilter = recs_filter.TFilter( overlap=None, existence=None, recency=None, and_=[ recs_filter.TFilter(overlap=None, existence=None, recency=None, and_=None, range=None, or_=None, any=None, named='GLOBAL'), recs_filter.TFilter(overlap=None, existence=None, recency=recs_filter.TRecencyFilter( range=recs_filter.TRange(max_=None, min_=-518400.0), field='pubDate'), and_=None, range=None, or_=None, any=None, named=None) ], range=None, or_=None, any=None, named=None) request.groups['featured'] = req.RecGroupRequest(count=COUNT1, metafilter=metafilter) COUNT2 = 15 metafilter = recs_filter.TFilter(overlap=None, existence=None, recency=None, and_=None, range=None, or_=None, any=None, named='GLOBAL') request.groups['articles'] = req.RecGroupRequest(count=COUNT2, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT1 + COUNT2
def test_rts(rts_host): COUNT1 = 5 COUNT2 = 1 request = req.RecsRequest(site_id='honest-reporting', bsin='ca297fe2-7390-4a70-9778-19c63b2cb3be', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter(overlap=None, existence=None, recency=None, and_=None, range=None, or_=None, any=None, named='GLOBAL') request.groups['hr_all'] = req.RecGroupRequest(count=COUNT1, metafilter=metafilter) metafilter = recs_filter.TFilter( overlap=None, existence=None, recency=None, and_=[ recs_filter.TFilter(overlap=None, existence=None, recency=None, and_=None, range=None, or_=None, any=None, named='GLOBAL'), recs_filter.TFilter(overlap=None, existence=None, recency=recs_filter.TRecencyFilter( range=recs_filter.TRange(max_=None, min_=-172800.0), field='pubDate'), and_=None, range=None, or_=None, any=None, named=None) ], range=None, or_=None, any=None, named=None) request.groups['hr_recent'] = req.RecGroupRequest(count=COUNT2, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT1 + COUNT2
def test_metafilter_yp_ca_en(): COUNT = 20 request = req.RecsRequest( site_id='593964c3c0f76bc59c65b324f9dbf869', bsin= 'f6cb11da-3342-4849-a098-2efe94f8e80e', #to be changaed to YP CA specific user seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( overlap=None, recency=None, and_=[ recs_filter.TFilter(overlap=None, recency=None, and_=None, existence=None, or_=None, named='GLOBAL', range=None), recs_filter.TFilter(overlap=recs_filter.TOverlapFilter( values=['lists_en'], field='resource-type', amount=recs_filter.TRange(min_=1.0, max_=None), match_type=0), recency=None, and_=None, existence=None, or_=None, named=None, range=None), recs_filter.TFilter(overlap=recs_filter.TOverlapFilter( values=['toronto'], field='cityRegion', amount=recs_filter.TRange(min_=1.0, max_=None), match_type=0), recency=None, and_=None, existence=None, or_=None, named=None, range=None) ], existence=None, or_=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': HOST, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_no_filter(customer_name, site_id): request = req.RecsRequest(site_id=site_id, bsin=BSIN, seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT) config = {'host': HOST, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='abril-capricho', bsin='418b83e4-6de3-4c7e-acbb-780d981423bf', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='12813b8b61d75410d6b804eb6ab73f4d', bsin='86183de5-99cd-4e97-900a-5262e97d3870', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='339c4cee6051c3aea99d9d91e3b71ab2', bsin='83cfeb50-8c2c-4bfa-8294-580213c43b4c', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 10 request = req.RecsRequest(site_id='0eddb34d4eb4be1df2b4160ec047aa73', bsin='4c3adc65-0e68-4a1e-9448-ecdce79fe7ee', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=1.0, max_=None), values=['article'], field='resource-type', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups['article'] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 5 request = req.RecsRequest(site_id='patient-info-prod', bsin='8a8a1d17-8029-491e-9ed6-e5ed659a4005', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( or_=None, range=None, and_=[ recs_filter.TFilter(or_=None, range=None, and_=None, existence=None, overlap=None, any=None, recency=None, named='GLOBAL'), recs_filter.TFilter(or_=None, range=None, and_=None, existence=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(max_=None, min_=1.0), match_type=0, field='resource-type', values=['Wellbeing']), any=None, recency=None, named=None) ], existence=None, overlap=None, any=None, recency=None, named=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 15 request = req.RecsRequest(site_id='wide-open-spaces', bsin='97b61121-34bf-4c00-ab2e-57fcecba05f0', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( or_=None, range=None, and_=[ recs_filter.TFilter(or_=None, range=None, and_=None, existence=None, overlap=None, any=None, recency=None, named='GLOBAL'), recs_filter.TFilter(or_=None, range=None, and_=None, existence=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(max_=None, min_=1.0), match_type=0, field='resource-type', values=['all']), any=None, recency=None, named=None) ], existence=None, overlap=None, any=None, recency=None, named=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='d14efd1c5848089137af10c7ee78252e', bsin='19b0ed4f-eb3f-4d4c-a876-86ba86e2033d', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='eea9006861e426c0e2efb4f432e697d7', bsin='406dcdee-4197-4b58-ab1b-3cbd6f3b7473', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='185873d1f902490c0e61f488ea3a1a38', bsin='99eb620e-7ad8-4267-8ace-ed66f5d97530', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='e0d1ed8756329211967755e409bfbfac', bsin='e902266b-5cd2-4381-84e0-77e04d4f9b3c', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 5 request = req.RecsRequest(site_id='75471913db291cdd62f3092709061407', bsin='29c08e54-c44b-45d6-9f91-3f7597421442', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=1.0, max_=None), values=['trending'], field='resource-type', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups['hotel'] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='64c06b289b11f0f1d36bf7f896abdf8b', bsin='498be1b8-5a60-4ecb-b598-05068eac7267', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 5 request = req.RecsRequest(site_id='kob-hubbard-tv', bsin='4b91521f-7598-4efe-97f6-0fe352fe0a6f', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=1.0, max_=None), values=['New%20Mexico%20News'], field='section', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups['hotel'] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='4c9d8da16dcdf0ae67be507cea7e82d7', bsin='490248c3-4cce-4424-93d5-c326e13817aa', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='aba800405495d72280d24634e9447e59', bsin='fb4a4f38-f2ac-4450-b896-b025f3250282', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='5d29921c2b8b2d6fb309bcf08c26f9f9', bsin='cd0c1b08-2b94-4bf5-ad21-4d3d259cf870', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='1154d080d208325324fa2f30fa1c1c64', bsin='1e038126-3fd3-4d6f-9ec9-c2f9cbe2a66d', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( existence=None, and_=[ recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=None, any=None, named='GLOBAL', range=None), recs_filter.TFilter(existence=None, and_=None, or_=None, recency=None, overlap=recs_filter.TOverlapFilter( amount=recs_filter.TRange(min_=None, max_=0.0), values=['game'], field='model', match_type=0), any=None, named=None, range=None) ], or_=None, recency=None, overlap=None, any=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_rts(rts_host): COUNT = 4 request = req.RecsRequest(site_id='snopes', bsin='50a46296-8a91-4c7a-bf0b-4f1a15b3ac33', seeds=EMPTY_SEEDS, excludes=EMPTY_EXCLUDES, recset_id=RECSET_ID, test=TEST) metafilter = recs_filter.TFilter( overlap=None, existence=None, recency=None, and_=[ recs_filter.TFilter(overlap=None, existence=None, recency=None, and_=None, range=None, or_=None, any=None, named='GLOBAL'), recs_filter.TFilter(overlap=recs_filter.TOverlapFilter( values=['article'], field='resource-type', match_type=0, amount=recs_filter.TRange(max_=None, min_=1.0)), existence=None, recency=None, and_=None, range=None, or_=None, any=None, named=None) ], range=None, or_=None, any=None, named=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': rts_host, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT
def test_metafilter_rappler(): site_id = '1a1e951c0be6ac5f7a57c617f1160972' request = req.RecsRequest(site_id=site_id, bsin=BSIN, seeds=['article|156222'], excludes=['article|156222'], recset_id='7aa96f3a-c7a5-11e6-b95c-0e62f196a588', test=False) metafilter = recs_filter.TFilter( overlap=None, recency=None, and_=[ recs_filter.TFilter(overlap=None, recency=None, and_=None, existence=None, or_=None, named='GLOBAL', range=None), recs_filter.TFilter(overlap=recs_filter.TOverlapFilter( values=['Nigeria', 'Gombe'], field='keywords', amount=recs_filter.TRange(min_=1.0, max_=None), match_type=0), recency=None, and_=None, existence=None, or_=None, named=None, range=None) ], existence=None, or_=None, named=None, range=None) request.groups[GROUP_NAME] = req.RecGroupRequest(count=COUNT, metafilter=metafilter) config = {'host': HOST, 'port': PORT, 'timeout': TIMEOUT} with RecommendationsClient(calling_app=CALLING_APP, **config) as client: response = client.get_recommendations(request) assert len(response) == COUNT for r in response: print(r)