Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: third_party/protobuf/python/google/protobuf/internal/message_factory_test.py

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/python/google/protobuf/internal/message_factory_test.py
diff --git a/third_party/protobuf/python/google/protobuf/internal/message_factory_test.py b/third_party/protobuf/python/google/protobuf/internal/message_factory_test.py
index 4caa244344a592b47a5f90b0728b5e2807142b8d..7bb7d1acecd62ab9db85b7b07c6209cb199939f9 100644
--- a/third_party/protobuf/python/google/protobuf/internal/message_factory_test.py
+++ b/third_party/protobuf/python/google/protobuf/internal/message_factory_test.py
@@ -114,18 +114,18 @@ class MessageFactoryTest(unittest.TestCase):
).issubset(set(messages.keys())))
self._ExerciseDynamicClass(
messages['google.protobuf.python.internal.Factory2Message'])
+ self.assertTrue(
+ set(['google.protobuf.python.internal.Factory2Message.one_more_field',
+ 'google.protobuf.python.internal.another_field'],
+ ).issubset(
+ set(messages['google.protobuf.python.internal.Factory1Message']
+ ._extensions_by_name.keys())))
factory_msg1 = messages['google.protobuf.python.internal.Factory1Message']
- self.assertTrue(set(
- ['google.protobuf.python.internal.Factory2Message.one_more_field',
- 'google.protobuf.python.internal.another_field'],).issubset(set(
- ext.full_name
- for ext in factory_msg1.DESCRIPTOR.file.pool.FindAllExtensions(
- factory_msg1.DESCRIPTOR))))
msg1 = messages['google.protobuf.python.internal.Factory1Message']()
- ext1 = msg1.Extensions._FindExtensionByName(
- 'google.protobuf.python.internal.Factory2Message.one_more_field')
- ext2 = msg1.Extensions._FindExtensionByName(
- 'google.protobuf.python.internal.another_field')
+ ext1 = factory_msg1._extensions_by_name[
+ 'google.protobuf.python.internal.Factory2Message.one_more_field']
+ ext2 = factory_msg1._extensions_by_name[
+ 'google.protobuf.python.internal.another_field']
msg1.Extensions[ext1] = 'test1'
msg1.Extensions[ext2] = 'test2'
self.assertEqual('test1', msg1.Extensions[ext1])

Powered by Google App Engine
This is Rietveld 408576698