def test_gapic(self):
headers = metrics.fill(collections.OrderedDict((
('gl-python', platform.python_version()),
('gapic', '1.0.0'),
)))
# Assert that the headers are set appropriately.
self.assertEqual(headers['gl-python'], platform.python_version())
self.assertEqual(headers['gapic'], '1.0.0')
self.assertEqual(headers['gax'], gax.__version__)
self.assertEqual(headers['grpc'], GRPC_VERSION)
# Assert that the headers are in the correct order.
self.assertEqual(
[k for k in headers.keys()],
['gl-python', 'gapic', 'gax', 'grpc'],
)
评论列表
文章目录