Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)

src/d/j/django-tenant-schemas-HEAD/tenant_schemas/tests/routes.py   django-tenant-schemas(Download)
from django.conf import settings
from django.db import connection
from django.test import TransactionTestCase
from django.test.client import RequestFactory
from tenant_schemas.middleware import TenantMiddleware
    def setUp(self):
        self.factory = RequestFactory()
        self.tm = TenantMiddleware()
 
        # settings needs some patching

src/d/j/django-tenant-schemas-HEAD/tenant_schemas/test/client.py   django-tenant-schemas(Download)
from django.test import RequestFactory, Client
from tenant_schemas.middleware import TenantMiddleware
 
 
class TenantRequestFactory(RequestFactory):
    tm = TenantMiddleware()
class TenantClient(Client):
    tm = TenantMiddleware()
 
    def __init__(self, tenant, enforce_csrf_checks=False, **defaults):
        super(TenantClient, self).__init__(enforce_csrf_checks, **defaults)

src/d/j/django-tenant-schemas-1.4.6-1-ga6e682d/tenant_schemas/tests/routes.py   django-tenant-schemas(Download)
from django.conf import settings
from django.db import connection
from django.test import TransactionTestCase
from django.test.client import RequestFactory
from tenant_schemas.middleware import TenantMiddleware
    def setUp(self):
        self.factory = RequestFactory()
        self.tm = TenantMiddleware()
 
        # settings needs some patching

src/d/j/django-tenant-schemas-1.4.6-1-ga6e682d/tenant_schemas/test/client.py   django-tenant-schemas(Download)
from django.test import RequestFactory, Client
from tenant_schemas.middleware import TenantMiddleware
 
 
class TenantRequestFactory(RequestFactory):
    tm = TenantMiddleware()
class TenantClient(Client):
    tm = TenantMiddleware()
 
    def __init__(self, tenant, enforce_csrf_checks=False, **defaults):
        super(TenantClient, self).__init__(enforce_csrf_checks, **defaults)