diff --git a/integration/test_auth.py b/integration/test_auth.py index 980ebaf59..9791f8f21 100644 --- a/integration/test_auth.py +++ b/integration/test_auth.py @@ -22,7 +22,7 @@ def _sign_in(custom_token, api_key): - body = {'token' : custom_token, 'returnSecureToken' : True} + body = {'token' : custom_token.decode(), 'returnSecureToken' : True} params = {'key' : api_key} resp = requests.request('post', _id_toolkit_url, params=params, json=body) resp.raise_for_status() diff --git a/integration/test_db.py b/integration/test_db.py index b13e071b9..eb60f8b0a 100644 --- a/integration/test_db.py +++ b/integration/test_db.py @@ -29,9 +29,9 @@ def update_rules(): new_rules = json.load(rules_file) client = db.reference()._client rules = client.request('get', '/.settings/rules.json') - existing = rules.get('rules', dict()).get('_adminsdk') + existing = rules.get('rules') if existing != new_rules: - rules['rules']['_adminsdk'] = new_rules + rules['rules'] = new_rules client.request('put', '/.settings/rules.json', json=rules) @pytest.fixture(scope='module') diff --git a/tests/data/dinosaurs_index.json b/tests/data/dinosaurs_index.json index 6ab946768..cd71ce460 100644 --- a/tests/data/dinosaurs_index.json +++ b/tests/data/dinosaurs_index.json @@ -1,25 +1,27 @@ { - "python": { - "dinodb": { - "dinosaurs": { - ".indexOn": ["height", "ratings/pos"] + "_adminsdk": { + "python": { + "dinodb": { + "dinosaurs": { + ".indexOn": ["height", "ratings/pos"] + }, + "scores": { + ".indexOn": ".value" + } }, - "scores": { - ".indexOn": ".value" - } - }, - "protected": { - "$uid": { - ".read": "auth != null", - ".write": "$uid === auth.uid" + "protected": { + "$uid": { + ".read": "auth != null", + ".write": "$uid === auth.uid" + } + }, + "admin": { + ".read": "false", + ".write": "false" + }, + "public": { + ".read": "true" } - }, - "admin": { - ".read": "false", - ".write": "false" - }, - "public": { - ".read": "true" } } }