示例#1
0
 def test_map_metadata_data_type_python_data_type(self):
     '''Does _map_metadata_data_type() return a dictionary key corresponding
     to the Python data type of a column?
     '''
     test_col = [{'id': 'test', 'type': 'type_str'}]
     self.assertIsNotNone(
         client._map_metadata_data_type(test_col)[0].get('python_type'))
示例#2
0
 def test_map_metadata_data_type_python_data_type(self):
     '''Does _map_metadata_data_type() return a dictionary key corresponding
     to the Python data type of a column?
     '''
     test_col = [{'id': 'test', 'type': 'type_str'}]
     self.assertIsNotNone(
         client._map_metadata_data_type(test_col)[0].get('python_type'))
示例#3
0
 def test_map_metadata_data_type_correct_python_data_type(self):
     '''Does _map_metadata_data_type() return the correct Python data type
     for the type string returned?
     '''
     test_col = [{'id': 'test', 'type': 'type_numeric'}]
     self.assertEquals(
         client._map_metadata_data_type(
             test_col)[0]['python_type'], decimal.Decimal)
示例#4
0
 def test_map_metadata_data_type_correct_python_data_type(self):
     '''Does _map_metadata_data_type() return the correct Python data type
     for the type string returned?
     '''
     test_col = [{'id': 'test', 'type': 'type_numeric'}]
     self.assertEquals(
         client._map_metadata_data_type(test_col)[0]['python_type'],
         decimal.Decimal)
示例#5
0
 def test_map_metadata_data_type_unknown_python_data_type(self):
     '''Does _map_metadata_data_type() return str for an unknown data type?
     '''
     test_col = [{'id': 'test', 'type': 'type_unknown'}]
     self.assertEquals(
         client._map_metadata_data_type(test_col)[0]['python_type'], str)
示例#6
0
 def test_map_metadata_data_type_unknown_python_data_type(self):
     '''Does _map_metadata_data_type() return str for an unknown data type?
     '''
     test_col = [{'id': 'test', 'type': 'type_unknown'}]
     self.assertEquals(
         client._map_metadata_data_type(test_col)[0]['python_type'], str)