コード例 #1
0
ファイル: badurls_test.py プロジェクト: jiposaka/kaytestpro
 def setUp(self):
     s = LazySettings(
         settings_module='kay.tests.regressiontests.badurls_settings')
     self.app = get_application(settings=s)
     try:
         self.client = Client(self.app, BaseResponse)
     except DeadlineExceededError:
         pass
コード例 #2
0
    def setUp(self):
        s = LazySettings(
            settings_module='kay.tests.regressiontests.server_error_settings')
        app = get_application(settings=s)
        self.client = Client(app, BaseResponse)
        self.client.test_logout()

        # Suppress logging error messages
        self._base_logger = logging.getLogger("")
        self._old_logging_handlers = self._base_logger.handlers
        self._base_logger.handlers = [NullHandler()]
コード例 #3
0
 def setUp(self):
     try:
         self.original_user = os.environ['USER_EMAIL']
         self.original_is_admin = os.environ['USER_IS_ADMIN']
         del os.environ['USER_EMAIL']
         del os.environ['USER_IS_ADMIN']
     except Exception:
         pass
     s = LazySettings(settings_module='kay.tests.google_settings')
     app = get_application(settings=s)
     self.client = Client(app, BaseResponse)
     self.client.test_logout()
コード例 #4
0
  def setUp(self):
    s = LazySettings(
      settings_module='kay.tests.ereporter_settings')
    app = get_application(settings=s)
    self.client = Client(app, BaseResponse)
    #self.client.test_logout()

    # Suppress logging error messages
    self._base_logger = logging.getLogger("")
    self._old_logging_handlers = self._base_logger.handlers
    self._base_logger.handlers = filter(
        lambda h: not isinstance(h, logging.StreamHandler),
        self._old_logging_handlers,
    ) 
コード例 #5
0
  def setUp(self):
    apiproxy_stub_map.apiproxy = apiproxy_stub_map.APIProxyStubMap()
    stub = datastore_file_stub.DatastoreFileStub('test','/dev/null',
                                                 '/dev/null')
    apiproxy_stub_map.apiproxy.RegisterStub('datastore_v3', stub)

    apiproxy_stub_map.apiproxy.RegisterStub(
      'user', user_service_stub.UserServiceStub())

    apiproxy_stub_map.apiproxy.RegisterStub(
      'memcache', memcache_stub.MemcacheServiceStub())

    apiproxy_stub_map.apiproxy.RegisterStub(
      'urlfetch', urlfetch_stub.URLFetchServiceStub())

    s = LazySettings(settings_module='kay.tests.settings')
    app = get_application(settings=s)
    self.client = Client(app, BaseResponse)
    if apiproxy_stub_map.apiproxy\
          ._APIProxyStubMap__stub_map.has_key('capability_service'):
      del(apiproxy_stub_map.apiproxy\
            ._APIProxyStubMap__stub_map['capability_service'])
コード例 #6
0
 def setUp(self):
   s = LazySettings(settings_module='kay.tests.rest_settings')
   app = get_application(settings=s)
   self.client = Client(app, BaseResponse)
   self.client.test_logout()
コード例 #7
0
 def setUp(self):
     from kay.auth import create_new_user
     s = LazySettings(settings_module='kay.tests.datastore_settings')
     app = get_application(settings=s)
     self.client = Client(app, BaseResponse)
     create_new_user("foobar", "password", is_admin=False)
コード例 #8
0
ファイル: tests.py プロジェクト: yosukesuzuki/jdatascraper
 def setUp(self):
     s = LazySettings(settings_module='kay.tests.cache_test.settings')
     self.app = get_application(settings=s)
     self.client = Client(self.app, BaseResponse)
     memcache.flush_all()
コード例 #9
0
 def setUp(self):
   s = LazySettings(settings_module='kay.tests.stacked_decorators.settings')
   app = get_application(settings=s)
   self.client = Client(app, BaseResponse)
コード例 #10
0
 def setUp(self):
   s = LazySettings(settings_module='kay.tests.settings')
   s.DEBUG = True
   app = get_application(settings=s)
   self.client = Client(app, BaseResponse)
コード例 #11
0
 def setUp(self):
     s = LazySettings(
         settings_module='kay.tests.securecookie_session_settings')
     app = get_application(settings=s)
     self.client = Client(app, BaseResponse)
コード例 #12
0
 def setUp(self):
     import os
     s = LazySettings(settings_module='kay.tests.cookie_session_settings')
     app = get_application(settings=s)
     self.client = Client(app, BaseResponse)
     self.server_name = os.environ['SERVER_NAME']
コード例 #13
0
 def setUp(self):
     s = LazySettings(settings_module='kay.tests.datastore_settings')
     app = get_application(settings=s)
     self.client = Client(app, BaseResponse)