My favorites | Sign in
Project Logo
                
Changes to /trunk/tests/__init__.py
r7 vs. r20   Edit
  Compare: vs.   Format:
Revision r20
Go to: 
Project members, sign in to write a code review
/trunk/tests/__init__.py   r7 /trunk/tests/__init__.py   r20
1 1
2 import os 2 """pypione test suite
3 import sys 3
4 # fix this... 4 The test suite requires the following::
5 sys.path.append('/usr/local/google_appengine') 5
6 sys.path.append('/usr/local/google_appengine/lib/django') 6 easy_install nose WebTest http://nose-gae.googlecode.com/svn/trunk/
7 sys.path.append('/usr/local/google_appengine/lib/webob') 7
8 sys.path.append('/usr/local/google_appengine/lib/yaml/lib') 8 The last one is a path to the noseGAE plugin (see http://code.google.com/p/nose-gae/) and it must be revision 25 or higher (currently 0.1.3a).
9 9 noseGAE sets up everything you need to run the pypione app in a simulated Google App Engine environment.
10 from google.appengine.tools import dev_appserver 10
11 from google.appengine.tools.dev_appserver_main import * 11 NOTE: as of this writing, issue6 (http://code.google.com/p/nose-gae/issues/detail?id=6) means you'll have to manually delete WebOb from your site-packages to get noseGAE to work.
12 option_dict = DEFAULT_ARGS.copy() 12
13 option_dict[ARG_CLEAR_DATASTORE] = True 13 Run the test suite with the nosetests (or nosetests-2.5) command from the root directory.
14 14
15 def setup(): 15 """
16 ## path to app:
17 root_path = os.path.join(os.path.dirname(__file__), '..')
18 logging.basicConfig(
19 level=option_dict[ARG_LOG_LEVEL],
20 format='%(levelname)-8s %(asctime)s %(filename)s] %(message)s')
21 config, matcher = dev_appserver.LoadAppConfig(root_path, {})
22 ## commented out stuff that checked for SDK updates
23 dev_appserver.SetupStubs(config.application, **option_dict)
24
Hosted by Google Code