8000 add test for user agent format · googleapis/google-cloud-python@dca6f00 · GitHub
[go: up one dir, main page]

Skip to content

Commit dca6f00

Browse files
Silvano Lucianisilvolu
authored andcommitted
add test for user agent format
also removed spurious empty line
1 parent c9e49e8 commit dca6f00

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gcloud/test_connection.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ def authorize(self, http):
4343
conn = self._makeOne(creds)
4444
self.assertTrue(conn.http is authorized)
4545
self.assertTrue(isinstance(creds._called_with, Http))
46+
47+
def test_user_agent_format(self):
48+
from pkg_resources import get_distribution
49+
expected_ua = 'gcloud-python/{0}'.format(get_distribution('gcloud').version)
50+
conn = self._makeOne()
51+
self.assertEqual(conn.USER_AGENT, expected_ua)

0 commit comments

Comments
 (0)
0