diff --git a/gcloud/test_connection.py b/gcloud/test_connection.py index 1e0ebb8f690f..1a9b274e91a5 100644 --- a/gcloud/test_connection.py +++ b/gcloud/test_connection.py @@ -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)