зеркало из https://github.com/mozilla/taar.git
Force the client_id to exist in the results from ProfileFetcher.
This commit is contained in:
Родитель
b5f0d6282c
Коммит
1fc30c0f91
|
@ -22,6 +22,7 @@ class ProfileFetcher(object):
|
||||||
if not addon.get('is_system', False)]
|
if not addon.get('is_system', False)]
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
"client_id": client_id,
|
||||||
"geo_city": profile_data.get("city", ''),
|
"geo_city": profile_data.get("city", ''),
|
||||||
"subsession_length": profile_data.get("subsession_length", 0),
|
"subsession_length": profile_data.get("subsession_length", 0),
|
||||||
"locale": profile_data.get('locale', ''),
|
"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
|
# Note that active_addons in the raw JSON source is remapped to
|
||||||
# 'installed_addons'
|
# 'installed_addons'
|
||||||
assert fetcher.get("random-client-id") == {
|
assert fetcher.get("random-client-id") == {
|
||||||
|
"client_id": 'random-client-id',
|
||||||
"bookmark_count": 0,
|
"bookmark_count": 0,
|
||||||
"disabled_addons_ids": [],
|
"disabled_addons_ids": [],
|
||||||
"geo_city": "Rome",
|
"geo_city": "Rome",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче