Dmitry P.
Dmitry P.
I had similar problem. I use DRF and want to test my api view which sets up a dramatiq task. I use StubBroker and pytest fixtures as said in django_dramatiq...
In my opinion the problem with writing a `StringIO` file is that we are still loading all of the data in memory and we actually generate a whole file before...
This is my version. It works on 3.6+ because of `f-strings`. If you change them on `.join()` it will probably work on previous 3+ versions. https://gist.github.com/wwarne/c72c0ec5fbfe3adecfc0214133f1b965
Very glad it helped! I'm not sure I understood the part about accepting a PR correctly. Because I, personally, can't accept PR's here. But I suppose @Bogdanp will be glad...
I suggest using https://github.com/django/asgiref You can check their `async_to_sync` function to see how many edge cases they have covered already. I use it with such decorator: ```python import dramatiq from...
I'm not sure is it bug or nor, using mutable objects as default values for a class variables is a very bad idea, and I will change my tests to...
> Perhaps a note about this gotcha in the Factory class would be useful? I think it would be great! > Using [`LazyFunction`](https://factoryboy.readthedocs.io/en/latest/reference.html#lazyfunction) is encouraged to copy mutable objects. Thanks...