Skip to content
This repository was archived by the owner on Mar 8, 2021. It is now read-only.
This repository was archived by the owner on Mar 8, 2021. It is now read-only.

Nested custom constructors are not evaluated #56

@kooba

Description

@kooba

This could be a problem with pyyaml itself.

When creating fixtures without models and nesting !now only first level is evaluated

This yaml definition:

simple_dict:
  fields:
    created_at: !now
    nested:
      created_at: !now

produces this output:

{ 
    'created_at': datetime.datetime(2015, 11, 25, 17, 27, 3, 119923, tzinfo=<UTC>), 
    'nested': {
        'created_at': <function configure_yaml.<locals>.now_constructor.<locals>.get_now at 0x1052cbbf8>
    }
}

Cheers,
Jakub

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions