我正在尝试测试新创建的表是否启用了连续备份。我正在使用Python和pytest,如下所示:
client = boto3.client('dynamodb', environ['REGION'])
backup_status = client.describe_continuous_backups(TableName=logs_table_name)['ContinuousBackupDescription']['PointInTimeRecoveryDescription']['PointInTimeRecoveryStatus']
assert backup_status == 'ENABLED'当测试运行时,它返回下面的错误
@amzn_request_id
def call_action(self):
self.body = json.loads(self.body or "{}")
endpoint = self.get_endpoint_name(self.headers)
if endpoint:
endpoint = camelcase_to_underscores(endpoint)
> response = getattr(self, endpoint)()
E AttributeError: 'DynamoHandler' object has no attribute 'describe_continuous_backups'尝试谷歌它,但没有运气,我也有一个类似的代码在另一个项目,它的工作正常。以前有没有人有过这样的经历?
发布于 2020-10-29 19:28:25
回答我自己的问题。describe_continuous_backups在moto 1.3.14中不可用,更新到1.3.16解决了这个问题。
https://stackoverflow.com/questions/64452368
复制相似问题