예제 #1
0
 def test_echo_ucsimple_api(self):
     value = {
         u'p1': {
             u'attr_int': 1,
             u'attr_str': u'test',
             u'vc_int': None,
             u'vc_str': None,
         },
     }
     # func_sig = 'p1=USERCLASS; p1.attr_int=INTEGER; p1.attr_str=STRING; p1.vc_int=STRING; p1.vc_str=STRING'
     canon = {u'p1': 'USERCLASS', u'p1.attr_int': 'INTEGER', u'p1.attr_str': 'STRING', u'p1.vc_int': 'STRING', u'p1.vc_str': 'STRING'}
     result = guessmeta_from_values(value)
     self.assertEqual(canon, result)
예제 #2
0
 def test_echo_ucsimple_api(self):
     value = {
         u'p1': {
             u'attr_int': 1,
             u'attr_str': u'test',
             u'vc_int': None,
             u'vc_str': None,
         },
     }
     # func_sig = 'p1=USERCLASS; p1.attr_int=INTEGER; p1.attr_str=STRING; p1.vc_int=STRING; p1.vc_str=STRING'
     canon = {
         u'p1': 'USERCLASS',
         u'p1.attr_int': 'INTEGER',
         u'p1.attr_str': 'STRING',
         u'p1.vc_int': 'STRING',
         u'p1.vc_str': 'STRING'
     }
     result = guessmeta_from_values(value)
     self.assertEqual(canon, result)
예제 #3
0
 def test_helloworld_api(self):
     value = {'hellostring': 'hello', 'counter': 1}
     canon = {u'counter': 'INTEGER', u'hellostring': 'STRING'}
     result = guessmeta_from_values(value)
     self.assertEqual(canon, result)
예제 #4
0
 def test_helloworld_api(self):
     value = {'hellostring': 'hello', 'counter': 1}
     canon = {u'counter': 'INTEGER', u'hellostring': 'STRING'}
     result = guessmeta_from_values(value)
     self.assertEqual(canon, result)