Re: [django-channels] Testing events from post_save signal

2018-02-25 Thread Tomáš Ehrlich
Kudos for you and all contributors! It’s really amazing. I’m going to send few PRs to django-channels as a payback :) Cheers, Tom > 25. 2. 2018 v 19:46, Andrew Godwin : > > No problem - glad everything else seems to work alright! Getting async > testing working well has been a long, hard ro

Re: [django-channels] Testing events from post_save signal

2018-02-25 Thread Andrew Godwin
No problem - glad everything else seems to work alright! Getting async testing working well has been a long, hard road :) Andrew On Sun, Feb 25, 2018 at 10:37 AM, Tomáš Ehrlich wrote: > Of course! > > It works now perfectly, thank you. Sorry I missed that in docs. > > Cheers, >Tom > > 25. 2

Re: [django-channels] Testing events from post_save signal

2018-02-25 Thread Tomáš Ehrlich
Of course! It works now perfectly, thank you. Sorry I missed that in docs. Cheers, Tom > 25. 2. 2018 v 19:12, Andrew Godwin : > > I think the change you need to make is swapping in database_sync_to_async > rather than sync_to_async - see here: > http://channels.readthedocs.io/en/latest/top

Re: [django-channels] Testing events from post_save signal

2018-02-25 Thread Andrew Godwin
I think the change you need to make is swapping in database_sync_to_async rather than sync_to_async - see here: http://channels.readthedocs.io/en/latest/topics/databases.html Andrew On Sun, Feb 25, 2018 at 7:14 AM, Tomáš Ehrlich wrote: > Here's the gist (https://gist.github.com/tricoder42/ > af

Re: [django-channels] Testing events from post_save signal

2018-02-25 Thread Tomáš Ehrlich
Here's the gist (https://gist.github.com/tricoder42/af3d0337c1b33d82c1b32d12bd0265ec) with consumer. Dne neděle 25. února 2018 15:37:19 UTC+1 Tomáš Ehrlich napsal(a): > > Hello, > I’ve just migrated my project to django-channels 2.x. Thanks to everyone > involved! > > I’m trying to write a test

[django-channels] Testing events from post_save signal

2018-02-25 Thread Tomáš Ehrlich
Hello, I’ve just migrated my project to django-channels 2.x. Thanks to everyone involved! I’m trying to write a test for a consumer. I have a post_save signal receiver, which sends a message to a group. As I understand, I need to wrap `group_send` with `async_to_sync` because django signals can’