Ejemplo n.º 1
0
    def FoldByteStream(self, mapped_value, **unused_kwargs):
        """Folds the data type into a byte stream.

    Args:
      mapped_value (object): mapped value.

    Raises:
      FoldingError: for testing.
    """
        raise dtfabric_errors.FoldingError(
            'Unable to fold to byte stream for testing purposes.')
Ejemplo n.º 2
0
    def FoldByteStream(self, unused_mapped_value, **unused_kwargs):
        """Folds the data type into a byte stream.

    Args:
      mapped_value (object): mapped value.

    Returns:
      bytes: byte stream.

    Raises:
      FoldingError: if the data type definition cannot be folded into
          the byte stream.
    """
        raise dtfabric_errors.FoldingError(
            'Unable to fold to byte stream for testing purposes.')