Example #1
0
    def testUndescribable(self):
        class NonService(object):
            def fn(self):
                pass

        for value in (NonService, NonService.fn, 1, 'string', 1.2, None):
            self.assertEquals(None, descriptor.describe(value))
    def testUndescribable(self):
        class NonService(object):
            def fn(self):
                pass

        for value in (NonService, NonService.fn, 1, "string", 1.2, None):
            self.assertEquals(None, descriptor.describe(value))
    def testMethod(self):
        class Param(messages.Message):
            pass

        class Service(remote.Service):
            @remote.method(Param, Param)
            def fn(self):
                return Param()

        self.assertEquals(descriptor.describe_method(Service.fn), descriptor.describe(Service.fn))
Example #4
0
    def testMethod(self):
        class Param(messages.Message):
            pass

        class Service(remote.Service):
            @remote.method(Param, Param)
            def fn(self):
                return Param()

        self.assertEquals(descriptor.describe_method(Service.fn),
                          descriptor.describe(Service.fn))
  def testService(self):
    class Service(remote.Service):
      pass

    self.assertEquals(descriptor.describe_service(Service),
                      descriptor.describe(Service))
 def testEnum(self):
   self.assertEquals(
     descriptor.describe_enum(test_util.OptionalMessage.SimpleEnum),
     descriptor.describe(test_util.OptionalMessage.SimpleEnum))
 def testMessage(self):
   self.assertEquals(descriptor.describe_message(test_util.NestedMessage),
                     descriptor.describe(test_util.NestedMessage))
 def testEnumValue(self):
   self.assertEquals(
     descriptor.describe_enum_value(
       test_util.OptionalMessage.SimpleEnum.VAL1),
     descriptor.describe(test_util.OptionalMessage.SimpleEnum.VAL1))
 def testField(self):
   self.assertEquals(
     descriptor.describe_field(test_util.NestedMessage.a_value),
     descriptor.describe(test_util.NestedMessage.a_value))
 def testModule(self):
   self.assertEquals(descriptor.describe_file(test_util),
                     descriptor.describe(test_util))
Example #11
0
    def testService(self):
        class Service(remote.Service):
            pass

        self.assertEquals(descriptor.describe_service(Service),
                          descriptor.describe(Service))
Example #12
0
 def testEnum(self):
     self.assertEquals(
         descriptor.describe_enum(test_util.OptionalMessage.SimpleEnum),
         descriptor.describe(test_util.OptionalMessage.SimpleEnum))
Example #13
0
 def testMessage(self):
     self.assertEquals(descriptor.describe_message(test_util.NestedMessage),
                       descriptor.describe(test_util.NestedMessage))
Example #14
0
 def testEnumValue(self):
     self.assertEquals(
         descriptor.describe_enum_value(
             test_util.OptionalMessage.SimpleEnum.VAL1),
         descriptor.describe(test_util.OptionalMessage.SimpleEnum.VAL1))
Example #15
0
 def testField(self):
     self.assertEquals(
         descriptor.describe_field(test_util.NestedMessage.a_value),
         descriptor.describe(test_util.NestedMessage.a_value))
Example #16
0
 def testModule(self):
     self.assertEquals(descriptor.describe_file(test_util),
                       descriptor.describe(test_util))