Exemplo n.º 1
0
    def test_signal(self):
        """If a title is given, it should be used to generate the slug."""
        def receiver_test_function(sender, instance):
            pass

        content_object_init.connect(receiver_test_function, sender=Page)
        page = Page(**self.page_kwargs)
        self.assertTrue(content_object_init.has_receivers_for(Page))
Exemplo n.º 2
0
    def test_signal(self):
        # If a title is given, it should be used to generate the slug.

        def receiver_test_function(sender, instance):
            pass

        content_object_init.connect(receiver_test_function, sender=Page)
        Page(**self.page_kwargs)
        self.assertTrue(content_object_init.has_receivers_for(Page))