From dca6f00ba8eac62fd59be9a7e82f5612316828dd Mon Sep 17 00:00:00 2001 From: Silvano Luciani Date: Wed, 1 Oct 2014 16:16:55 -0700 Subject: [PATCH] add test for user agent format also removed spurious empty line --- gcloud/test_connection.py | 6 ++++++ 1 file changed, 6 insertions(+) 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)