Skip to content

Instantly share code, notes, and snippets.

View phacic's full-sized avatar
🏠
Working from home

Karlmichael phacic

🏠
Working from home
View GitHub Profile
@gcavalcante8808
gcavalcante8808 / wsgi_bjoern.py
Created January 17, 2019 13:44
Bjoern Django Final
import bjoern
import os, signal
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app.settings')
app = get_wsgi_application()
NUM_WORKERS = 8
@thekie
thekie / CeleryTestCase.py
Last active December 3, 2020 10:26
Celery only gives instructions on how to write integration tests using pyTest not the god ol' python UnitTest framework. So I wrote a CeleryTestCase which can be used as a base class for your integration tests using a real celery worker in the background.
from unittest import TestCase
from celery.contrib.testing import worker
class CeleryTestCase(TestCase):
@property
def celery_app(self):
"""
Override this method to provide this testcase with the celery app under test
"""
@crodjer
crodjer / test_ws.py
Created August 22, 2015 12:50
Application to demonstrate testing tornado websockets
'''
Application to demonstrate testing tornado websockets.
Try it wiith: python -m tornado.testing discover
'''
from tornado import testing, httpserver, gen, websocket
from ws import APP