Skip to content

Commit

Permalink
add test for user agent format
Browse files Browse the repository at this point in the history
also removed spurious empty line
  • Loading branch information
Silvano Luciani authored and silvolu committed Oct 3, 2014
1 parent c9e49e8 commit dca6f00
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gcloud/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ def authorize(self, http):
conn = self._makeOne(creds)
self.assertTrue(conn.http is authorized)
self.assertTrue(isinstance(creds._called_with, Http))

def test_user_agent_format(self):
from pkg_resources import get_distribution
expected_ua = 'gcloud-python/{0}'.format(get_distribution('gcloud').version)
conn = self._makeOne()
self.assertEqual(conn.USER_AGENT, expected_ua)

0 comments on commit dca6f00

Please sign in to comment.