Force the client_id to exist in the results from ProfileFetcher.

This commit is contained in:
Victor Ng 2018-02-28 11:49:04 -05:00
Родитель b5f0d6282c
Коммит 1fc30c0f91
2 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -22,6 +22,7 @@ class ProfileFetcher(object):
if not addon.get('is_system', False)]
return {
"client_id": client_id,
"geo_city": profile_data.get("city", ''),
"subsession_length": profile_data.get("subsession_length", 0),
"locale": profile_data.get('locale', ''),

Просмотреть файл

@ -28,6 +28,7 @@ def test_profile_fetcher_returns_dict():
# Note that active_addons in the raw JSON source is remapped to
# 'installed_addons'
assert fetcher.get("random-client-id") == {
"client_id": 'random-client-id',
"bookmark_count": 0,
"disabled_addons_ids": [],
"geo_city": "Rome",