kuzxnia / async_factory_boy

factory_boy extension with asynchronous ORM support
https://pypi.org/project/async-factory-boy/
MIT License
18 stars 7 forks source link

fix: allow reference sub-factories in SelfAttribute #8

Open ADR-007 opened 6 months ago

ADR-007 commented 6 months ago

BREAKING CHANGE: AsyncSQLAlchemyFactory.build() and AsyncSQLAlchemyFactory.build_batch() now have to be awaited

ADR-007 commented 5 months ago

The error doesn't look related to my changes:

      def finalizer() -> None:
          """
          Cleans up the DB after testing. Must be called as part of the test environment teardown.
          """
          _restore_default()
          loop = _LOOP
          loop._selector = _SELECTOR  # type: ignore
  >       loop.run_until_complete(Tortoise._drop_databases())
FadingFog commented 2 months ago

@ADR-007 Thanks for PR. Same issue with build_batch() method. Can you please fix this too?

ADR-007 commented 2 months ago

@ADR-007 Thanks for PR. Same issue with the build_batch() method. Can you please fix this too?

Sure, but I'm quite busy now :(

ADR-007 commented 2 months ago

@ADR-007 Thanks for PR. Same issue with build_batch() method. Can you please fix this too?

It should be good now :)

FadingFog commented 2 months ago

@kuzxnia Hi, can you review & merge this PR?