paulocheque / django-dynamic-fixture

A complete library to create dynamic model instances for testing purposes.
http://django-dynamic-fixture.readthedocs.io/
Other
391 stars 67 forks source link

Pass DDF models to pytest parametrize decorator #149

Open JakNowy opened 2 years ago

JakNowy commented 2 years ago

It would be awesome if we could have something like:

@pytest.mark.parametrize('db_object', [G(Model1), G(Model2)])
    def test_foo(db_object):
        ...

Looks like there is some issue with the db init, would it be possible to make it work?

JakNowy commented 1 year ago

Bumping. It can be worked around with some if statements (ideally switch case in new python), but still pollutes the code notably.