summaryrefslogtreecommitdiff
path: root/passlib/tests/tox_support.py
blob: 7da0546322f39734fbbfb32a697ae22357e57d7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""passlib.tests.tox_support - helper script for tox tests"""
#=============================================================================
# imports
#=============================================================================
# core
import os
import logging; log = logging.getLogger(__name__)
# site
# pkg
# local
__all__ = [
]

#=============================================================================
# main
#=============================================================================
def main(path, runtime):
    "write fake GAE ``app.yaml`` to current directory so nosegae will work"
    from passlib.tests.utils import set_file
    set_file(os.path.join(path, "app.yaml"), """\
application: fake-app
version: 2
runtime: %s
api_version: 1

handlers:
- url: /.*
  script: dummy.py
""" % runtime)

if __name__ == "__main__":
    import sys
    sys.exit(main(*sys.argv[1:]) or 0)

#=============================================================================
# eof
#=============================================================================