예제 #1
0
파일: test_tenancy.py 프로젝트: turkus/seth
    def test_schema_context_schema_exists_use_schema_domain_url(self):
        Tenant.manager.create(schema_name='test1', domain_url='test1.com')
        Tenant.manager.create(schema_name='test2', domain_url='test2.com')

        with schema_context(schema_name='test1'):
            pass
예제 #2
0
파일: test_tenancy.py 프로젝트: turkus/seth
    def test_schema_context_schema_does_not_exist(self):
        Tenant.manager.create(schema_name='test1', domain_url='test.com')

        with self.assertRaises(HTTPNotFound):
            with schema_context(schema_name='does_not_exist'):
                pass