def _mock_update_table(self, body):
     proto = pb2.UpdateTableResponse()
     proto.reserved_throughput_details.capacity_unit.read = 10
     proto.reserved_throughput_details.capacity_unit.write = 10
     proto.reserved_throughput_details.last_increase_time = int(123456)
     #proto.reserved_throughput_details.last_decrease_time = int(123456)
     proto.reserved_throughput_details.number_of_decreases_today = 5
     return proto
Пример #2
0
    def _decode_update_table(self, body):
        proto = pb2.UpdateTableResponse()
        proto.ParseFromString(body)

        reserved_throughput_details = self._parse_reserved_throughput_details(proto.reserved_throughput_details)
        table_options = self._parse_table_options(proto.table_options)
        update_table_response = UpdateTableResponse(reserved_throughput_details, table_options)

        return update_table_response, proto