8000 e2e · rinlevan/firebase-admin-python@70a3340 · GitHub
[go: up one dir, main page]

Skip to content

Commit 70a3340

Browse files
committed
e2e
1 parent 79f9d61 commit 70a3340

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

firebase_admin/dynamic_links.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def get_link_stats(short_link, stat_options, app=None):
5656
url must start with the protocol "http"
5757
stat_options should have a field with duration_days > 0
5858
"""
59-
return _get_link_service(app)._get_stats(short_link, stat_options)
59+
return _get_link_service(app).get_stats(short_link, stat_options)
6060

6161
def _get_link_service(app):
6262
"""Returns an _LinksService instance for an App.
@@ -193,7 +193,8 @@ def _format_request_string(self, short_link, options):
193193
#pylint: enable=redundant-keyword-arg
194194
return self._request_string.format(url_quoted, days)
195195

196-
def _get_stats(self, short_link, stat_options):
196+
def get_stats(self, short_link, stat_options):
197+
"""Returns the LinkStats of the requested short_link for the duration set in options"""
197198
if(not isinstance(short_link, six.string_types)
198199
or not short_link.startswith('https://')):
199200
raise ValueError('short_link must be a string and begin with "https://".')

integration/test_dynamic_links.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@
2626
try:
2727
dynamic_links_e2e_url = testutils.resource('dynamic_links_e2e_url.txt').strip()
2828
except IOError:
29-
sys.stderr.write("End to end tests not set up, see CONTRIBTING.md file.")
29+
sys.stderr.write("\nEnd to end tests not set up, see CONTRIBTING.md file.\n")
3030

31+
@pytest.mark.skipif(not dynamic_links_e2e_url,
32+
reason="End to end tests not set up, see CONTRIBTING.md file.")
3133
class TestEndToEnd(object):
3234
"""Runs an end to end test, see comment string for setup."""
3335

0 commit comments

Comments
 (0)
0