Implemented IID delete API (#95) · firebase/firebase-admin-python@3b6b613 · GitHub
Skip to content

Commit 3b6b613

Browse files
authored
Implemented IID delete API (#95)
* Implemented IID delete API * Implemented better error handling * Improved error handling * Resolved TODO regarding backend errors * Fixing typo * Improved error handling * Updated error message format
1 parent 6901b89 commit 3b6b613

3 files changed

Lines changed: 244 additions & 0 deletions

File tree

firebase_admin/instance_id.py

Lines changed: 106 additions & 0 deletions

integration/test_instance_id.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2017 Google Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""Integration tests for firebase_admin.instance_id module."""
16+
17+
import pytest
18+
19+
from firebase_admin import instance_id
20+
21+
def test_delete_non_existing():
22+
with pytest.raises(instance_id.ApiCallError) as excinfo:
23+
instance_id.delete_instance_id('non-existing')
24+
assert str(excinfo.value) == 'Instance ID "non-existing": Failed to find the instance ID.'

tests/test_instance_id.py

Lines changed: 114 additions & 0 deletions

0 commit comments

Comments
 (0)