コード例 #1
0
ファイル: test_dynamodb.py プロジェクト: bbc/localstack
 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
ファイル: test_dynamodb.py プロジェクト: bbc/localstack
 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
ファイル: test_dynamodb.py プロジェクト: zknyy/localstack
 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
ファイル: test_dynamodb.py プロジェクト: zknyy/localstack
 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
ファイル: test_dynamodb.py プロジェクト: zhiweil/localstack
 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
ファイル: test_dynamodb.py プロジェクト: bbc/localstack
 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