Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 9b5eb6d

Browse files
committed
test: add test case for common proto
1 parent fab9580 commit 9b5eb6d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/unit/schema/test_metadata.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ def test_address_str_parent():
4343
assert str(addr) == 'baz.spam.eggs.Bacon'
4444

4545

46+
def test_address_str_different_proto_package():
47+
addr = metadata.Address(package=('google', 'iam', 'v1'), module='options', name='GetPolicyOptions',
48+
api_naming=naming.NewNaming(proto_package='foo.bar.baz.v1'))
49+
assert str(addr) == 'options_pb2.GetPolicyOptions'
50+
51+
4652
def test_address_proto():
4753
addr = metadata.Address(package=('foo', 'bar'), module='baz', name='Bacon')
4854
assert addr.proto == 'foo.bar.Bacon'

0 commit comments

Comments
 (0)