Skip to content

Incompatible with Pynamodb 6.x #436

@yan12125

Description

@yan12125

With pynamodb 6.0.1, I got a test failure:

________________________________ test_exception ________________________________

    def test_exception():
        class SampleModel(Model):
            class Meta:
                region = 'us-west-2'
                table_name = 'mytable'

            sample_attribute = UnicodeAttribute(hash_key=True)

        try:
            SampleModel.describe_table()
        except Exception:
            pass

        subsegments = xray_recorder.current_segment().subsegments
        assert len(subsegments) == 1
        subsegment = subsegments[0]
        assert subsegment.name == 'dynamodb'
>       assert len(subsegment.subsegments) == 0
E       assert 1 == 0
E        +  where 1 = len([<aws_xray_sdk.core.models.subsegment.Subsegment object at 0x7c54cfd0ef00>])
E        +    where [<aws_xray_sdk.core.models.subsegment.Subsegment object at 0x7c54cfd0ef00>] = <aws_xray_sdk.core.models.subsegment.Subsegment object at 0x7c54d140e600>.subsegments

tests/ext/pynamodb/test_pynamodb.py:48: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions