New model_mommy release + Deprecation Warning

2019-10-22 Thread Bernardo Fontes
Hi to all Django users,

Maybe a few people from the group use model_mommy lib to help with your
tests fixtures. As one of the maintainers of the project, I'm here to
announce its latest and final release 2.0.0 because the lib is now called
*model_bakery*.

All the information to help you to migrate your project from model_mommy to
model_bakery and the reasons behind this renaming can be found here:
https://model-mommy.readthedocs.io/en/latest/

Thanks,

-- 
Bernardo Fontes
http://berinfontes.com
http://pessoas.cc
Skype: bernardoxhc
+55 11 98398 2378

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHiHhz%2B2pkdFjJpdG0UtY53RqVG0Y55x%3DziyJmFHOBRj7c%3DfeA%40mail.gmail.com.


Re: Testing if a receiver is connected to a signal

2011-05-05 Thread Bernardo Fontes
Hello everybody,

I resolved this problem by looking at Djangos Signal's code and
understanding its structure. The signal has an attribute called receivers
which has stored references to its receivers function that were connect to
it. When the send function is called, the signal just call this function
which are in this receivers list. So, I created a setUpClass and a
tearDownClass that does a monkey patch with my signal. It's like this:


class YourTestClass(TestCase):

@classmethod
def setUpClass(cls):
cls.signal_receivers = my_signal.receivers
my_signal.receivers = []


@classmethod
def tearDownClass(cls):
my_signal.receivers = cls.signal_receivers

Hope I could help!

-- 
Bernardo Fontes
http://www.bernardofontes.net
bernardo...@gmail.com 
Skype: bernardoxhc
(21) 9629 1621

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Testing if a receiver is connected to a signal

2011-04-19 Thread Bernardo Fontes
Hi,

I'm having this problem too. Does anyone knows a good strategy to
handle this problem?

On 21 fev, 17:50, Vinicius Mendes  wrote:
> Hi,
>
> I want to test if a receiver function is connected to a signal in django,
> but I don't want other receivers from other apps to be called when my test
> runs.
>
> I thought of verifying if my callback function is in the receivers list of
> the signal, but this list stores the receivers in a strange way.
>
> Any ideas?
>
> Atenciosamente,
> Vinicius Mendes
> Engenheiro de Computação
> Globo.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.