def test_with_ordered_argument(self):
headers = collections.OrderedDict()
headers['gl-python'] = platform.python_version()
headers['gapic'] = '1.0.0'
headers['gax'] = gax.__version__
headers['grpc'] = GRPC_VERSION
string = metrics.stringify(headers)
# Check for the exact string, order and all.
expected = 'gl-python/{python} gapic/{gapic} gax/{gax} grpc/{grpc}'
self.assertEqual(string, expected.format(
gapic='1.0.0',
gax=gax.__version__,
grpc=GRPC_VERSION,
python=platform.python_version(),
))
评论列表
文章目录