| /trunk/test/__init__.py r2 | /trunk/tests/__init__.py r7 | ||
| 1 | 1 | ||
|---|---|---|---|
| 2 | import os | 2 | import os |
| 3 | import sys | 3 | import sys |
| 4 | # fix this... | 4 | # fix this... |
| 5 | sys.path.append('/usr/local/google_appengine') | 5 | sys.path.append('/usr/local/google_appengine') |
| 6 | sys.path.append('/usr/local/google_appengine/lib/django') | 6 | sys.path.append('/usr/local/google_appengine/lib/django') |
| 7 | sys.path.append('/usr/local/google_appengine/lib/webob') | 7 | sys.path.append('/usr/local/google_appengine/lib/webob') |
| 8 | sys.path.append('/usr/local/google_appengine/lib/yaml/lib') | 8 | sys.path.append('/usr/local/google_appengine/lib/yaml/lib') |
| 9 | 9 | ||
| 10 | from google.appengine.tools import dev_appserver | 10 | from google.appengine.tools import dev_appserver |
| 11 | from google.appengine.tools.dev_appserver_main import * | 11 | from google.appengine.tools.dev_appserver_main import * |
| 12 | option_dict = DEFAULT_ARGS.copy() | 12 | option_dict = DEFAULT_ARGS.copy() |
| 13 | option_dict[ARG_CLEAR_DATASTORE] = True | 13 | option_dict[ARG_CLEAR_DATASTORE] = True |
| 14 | 14 | ||
| 15 | def setup(): | 15 | def setup(): |
| 16 | ## path to app: | 16 | ## path to app: |
| 17 | root_path = os.path.join(os.path.dirname(__file__), '..') | 17 | root_path = os.path.join(os.path.dirname(__file__), '..') |
| 18 | logging.basicConfig( | 18 | logging.basicConfig( |
| 19 | level=option_dict[ARG_LOG_LEVEL], | 19 | level=option_dict[ARG_LOG_LEVEL], |
| 20 | format='%(levelname)-8s %(asctime)s %(filename)s] %(message)s') | 20 | format='%(levelname)-8s %(asctime)s %(filename)s] %(message)s') |
| 21 | config, matcher = dev_appserver.LoadAppConfig(root_path, {}) | 21 | config, matcher = dev_appserver.LoadAppConfig(root_path, {}) |
| 22 | ## commented out stuff that checked for SDK updates | 22 | ## commented out stuff that checked for SDK updates |
| 23 | dev_appserver.SetupStubs(config.application, **option_dict) | 23 | dev_appserver.SetupStubs(config.application, **option_dict) |
| 24 | 24 | ||