def document_shape_default(self, section, shape, history, include=None, exclude=None, **kwargs): py_type = self._get_special_py_default(shape) if py_type is None: py_type = py_default(shape.type_name) if self._context.get('streaming_shape') == shape: py_type = 'StreamingBody()' section.write(py_type)
def test_blob(self): self.assertEqual('b\'bytes\'', py_default('blob'))
def test_string(self): self.assertEqual('\'string\'', py_default('string'))
def test_map(self): self.assertEqual('{...}', py_default('map'))
def test_list(self): self.assertEqual('[...]', py_default('list'))
def test_structure(self): self.assertEqual('{...}', py_default('structure'))
def test_long(self): self.assertEqual('123', py_default('long'))
def test_timestamp(self): self.assertEqual('datetime(2015, 1, 1)', py_default('timestamp'))
def test_integer(self): self.assertEqual('123', py_default('integer'))
def test_double(self): self.assertEqual('123.0', py_default('double'))
def document_shape_default(self, section, shape, history, include=None, exclude=None, **kwargs): py_type = py_default(shape.type_name) section.write(py_type)