コード例 #1
0
ファイル: utils.py プロジェクト: ella/ella-flatcomments
def disconnect_legacy_signals():
    " Disconnect signals for ell-comments to allow tests and migrations to run. "
    from ella.core.signals import content_published, content_unpublished
    from ella_comments.listing_handlers import publishable_published, publishable_unpublished

    content_published.disconnect(publishable_published)
    content_unpublished.disconnect(publishable_unpublished)
コード例 #2
0
ファイル: utils.py プロジェクト: cooncesean/ella-flatcomments
def disconnect_legacy_signals():
    " Disconnect signals for ell-comments to allow tests and migrations to run. "
    from ella.core.signals import content_published, content_unpublished
    from ella_comments.listing_handlers import publishable_published, publishable_unpublished

    content_published.disconnect(publishable_published)
    content_unpublished.disconnect(publishable_unpublished)
コード例 #3
0
ファイル: test_cache.py プロジェクト: MikeLing/ella
    def tearDown(self):
        redis.client = None
        pre_save.disconnect(redis.listing_pre_save, sender=Listing)
        post_save.disconnect(redis.listing_post_save, sender=Listing)
        pre_delete.disconnect(redis.listing_pre_delete, sender=Listing)
        post_delete.disconnect(redis.listing_post_delete, sender=Listing)
        content_published.disconnect(redis.publishable_published)
        content_unpublished.disconnect(redis.publishable_unpublished)

        super(TestAuthorLH, self).tearDown()
        self.redis.flushdb()
コード例 #4
0
    def tearDown(self):
        redis.client = None
        pre_save.disconnect(redis.listing_pre_save, sender=Listing)
        post_save.disconnect(redis.listing_post_save, sender=Listing)
        pre_delete.disconnect(redis.listing_pre_delete, sender=Listing)
        post_delete.disconnect(redis.listing_post_delete, sender=Listing)
        content_published.disconnect(redis.publishable_published)
        content_unpublished.disconnect(redis.publishable_unpublished)

        super(TestRedisListings, self).tearDown()
        self.redis.flushdb()