aboutsummaryrefslogtreecommitdiffhomepage
path: root/python/google/protobuf/internal/symbol_database_test.py
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2017-03-29 14:32:48 -0700
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2017-03-29 14:33:05 -0700
commitd36c0c538a545fac5d9db6ba65c525246d4efa95 (patch)
tree3fd29af0f137dfaf5df892723e60600f674392b3 /python/google/protobuf/internal/symbol_database_test.py
parent4a0dd03e52e09332c8fd0f8f26a8e0ae9f911182 (diff)
Down-integrate from google3.
Diffstat (limited to 'python/google/protobuf/internal/symbol_database_test.py')
-rw-r--r--python/google/protobuf/internal/symbol_database_test.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/python/google/protobuf/internal/symbol_database_test.py b/python/google/protobuf/internal/symbol_database_test.py
index 4f5173b2..af42681a 100644
--- a/python/google/protobuf/internal/symbol_database_test.py
+++ b/python/google/protobuf/internal/symbol_database_test.py
@@ -60,6 +60,7 @@ class SymbolDatabaseTest(unittest.TestCase):
db.RegisterMessage(unittest_pb2.TestAllTypes.RepeatedGroup)
db.RegisterEnumDescriptor(unittest_pb2.ForeignEnum.DESCRIPTOR)
db.RegisterEnumDescriptor(unittest_pb2.TestAllTypes.NestedEnum.DESCRIPTOR)
+ db.RegisterServiceDescriptor(unittest_pb2._TESTSERVICE)
return db
def testGetPrototype(self):
@@ -109,7 +110,13 @@ class SymbolDatabaseTest(unittest.TestCase):
self._Database().pool.FindMessageTypeByName(
'protobuf_unittest.TestAllTypes.NestedMessage').full_name)
- def testFindFindContainingSymbol(self):
+ def testFindServiceByName(self):
+ self.assertEqual(
+ 'protobuf_unittest.TestService',
+ self._Database().pool.FindServiceByName(
+ 'protobuf_unittest.TestService').full_name)
+
+ def testFindFileContainingSymbol(self):
# Lookup based on either enum or message.
self.assertEqual(
'google/protobuf/unittest.proto',