示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 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)
示例#5
0
 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
示例#6
0
 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