uber / charlatan

A Python library to efficiently manage and install database fixtures
https://charlatan.readthedocs.org/en/latest/
Other
89 stars 12 forks source link

Support multiple levels of nesting for relationships #35

Closed minglecm closed 9 years ago

minglecm commented 9 years ago

At the moment this type of fixture is not supported:

job:
  fields:
    messages:
      -
        - !rel user1.id
        - "some content"

      -
        - !rel user2.id
        - "some more content for another user"

The !rel user1.id ends up turning into user1.id because we only look at the first two levels.

This diff seeks to support parsing relationships for multiple levels of nesting.

minglecm commented 9 years ago

@charlax would appreciate a review.

/cc @mkadin

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-0.31%) when pulling 3f7111ce1920493fd55835e64049a34a852a711d on cm/support_multiple_levels_of_nesting into 764127f0d957b6c0d4ffe476bbc2fa5bca6b5dfd on master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.01%) when pulling 3f7111ce1920493fd55835e64049a34a852a711d on cm/support_multiple_levels_of_nesting into 764127f0d957b6c0d4ffe476bbc2fa5bca6b5dfd on master.

charlax commented 9 years ago

This looks good! Thanks a lot.

Can you add this in the changelog, under a new section with (unreleased) instead of the date?

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.01%) when pulling a1fd748e90f5bda2d2e492cf71d344806daf9326 on cm/support_multiple_levels_of_nesting into 764127f0d957b6c0d4ffe476bbc2fa5bca6b5dfd on master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.01%) when pulling b2b83684cec27bba6d800d4f81025cd236c930e6 on cm/support_multiple_levels_of_nesting into 764127f0d957b6c0d4ffe476bbc2fa5bca6b5dfd on master.