def test_untag_resource(self): response = testutil.send_dynamodb_request('', action='UntagResource', request_body=json.dumps({ 'ResourceArn': testutil.get_sample_arn('dynamodb', 'table'), 'TagKeys': ['tagkey1', 'tagkey2'] # Keys to untag })) assert response.status_code == 200 assert not response._content # Empty string if untagging succeeded (mocked for now)
def test_tag_resource(self): response = testutil.send_dynamodb_request('', action='TagResource', request_body=json.dumps({ 'ResourceArn': testutil.get_sample_arn('dynamodb', 'table'), 'Tags': [{'tagkey1': 'tagvalue1'}, {'tagkey2': 'tagvalue2'}, {'tagkey3': 'tagvalue3'}] })) assert response.status_code == 200 assert not response._content # Empty string if tagging succeeded (mocked for now)
def test_list_tags_of_resource(self): response = testutil.send_dynamodb_request( '', action='ListTagsOfResource', request_body=json.dumps( {'ResourceArn': testutil.get_sample_arn('dynamodb', 'table')})) assert response.status_code == 200 assert json.loads(response._content)['Tags'] == [ ] # Empty list returned
def test_list_tags_of_resource(self): response = testutil.send_dynamodb_request('', action='ListTagsOfResource', request_body=json.dumps({ 'ResourceArn': testutil.get_sample_arn('dynamodb', 'table') })) assert response.status_code == 200 assert json.loads(response._content)['Tags'] == [] # Empty list returned