aboutsummaryrefslogtreecommitdiff
path: root/python/google/protobuf/internal/generator_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/google/protobuf/internal/generator_test.py')
-rwxr-xr-xpython/google/protobuf/internal/generator_test.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/python/google/protobuf/internal/generator_test.py b/python/google/protobuf/internal/generator_test.py
index 03361e66..50fc1922 100755
--- a/python/google/protobuf/internal/generator_test.py
+++ b/python/google/protobuf/internal/generator_test.py
@@ -41,7 +41,8 @@ further ensures that we can use Python protocol message objects as we expect.
__author__ = 'robinson@google.com (Will Robinson)'
-from google.apputils import basetest
+import unittest
+
from google.protobuf.internal import test_bad_identifiers_pb2
from google.protobuf import unittest_custom_options_pb2
from google.protobuf import unittest_import_pb2
@@ -55,7 +56,7 @@ from google.protobuf import symbol_database
MAX_EXTENSION = 536870912
-class GeneratorTest(basetest.TestCase):
+class GeneratorTest(unittest.TestCase):
def testNestedMessageDescriptor(self):
field_name = 'optional_nested_message'
@@ -291,7 +292,7 @@ class GeneratorTest(basetest.TestCase):
self.assertIs(desc.oneofs[0], desc.oneofs_by_name['oneof_field'])
nested_names = set(['oneof_uint32', 'oneof_nested_message',
'oneof_string', 'oneof_bytes'])
- self.assertSameElements(
+ self.assertItemsEqual(
nested_names,
[field.name for field in desc.oneofs[0].fields])
for field_name, field_desc in desc.fields_by_name.iteritems():
@@ -301,7 +302,7 @@ class GeneratorTest(basetest.TestCase):
self.assertIsNone(field_desc.containing_oneof)
-class SymbolDatabaseRegistrationTest(basetest.TestCase):
+class SymbolDatabaseRegistrationTest(unittest.TestCase):
"""Checks that messages, enums and files are correctly registered."""
def testGetSymbol(self):
@@ -340,4 +341,4 @@ class SymbolDatabaseRegistrationTest(basetest.TestCase):
'google/protobuf/unittest.proto').name)
if __name__ == '__main__':
- basetest.main()
+ unittest.main()