def test_parse_arn_resource_only(self):
        endpoint = NeptuneEndpoint(host="host",
                                   port=5555,
                                   region="us-east-1",
                                   ssl=False)
        client = AltimeterNeptuneClient(0, endpoint)
        actual_dict = client.parse_arn("test")

        self.assertEqual("test", actual_dict["resource"])
예제 #2
0
    def test_parse_arn_resource_type_ami(self):
        endpoint = NeptuneEndpoint(host="host", port=5555, region="us-east-1", ssl=False)
        client = AltimeterNeptuneClient(0, endpoint)
        expected_dict = {
            "arn": "arn",
            "partition": "aws",
            "service": "ec2",
            "region": "us-east-1",
            "account": "123",
            "resource": "ami",
            "resource_type": "ami",
        }
        actual_dict = client.parse_arn("arn:aws:ec2:us-east-1:123:ami:ami-123")

        self.assertDictEqual(expected_dict, actual_dict)