# HG changeset patch # User Augie Fackler # Date 1244302256 18000 # Node ID c4958af146346668c2b969307990378d0b79ef2e # Parent bf70c5a0ef66728dc9cf8b9acf7b73397d28006d Add HTTP_HOST to environ variables mocked. Also add license headers to run.py. diff -r bf70c5a0ef66 -r c4958af14634 tests/run.py --- a/tests/run.py Sat Jun 06 17:28:56 2009 +0200 +++ b/tests/run.py Sat Jun 06 10:30:56 2009 -0500 @@ -1,4 +1,24 @@ -#!/usr/bin/env python2.5 +#!/usr/bin/python2.5 +# +# Copyright 2009 the Melange authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +__authors__ = [ + '"Augie Fackler" ', + ] + import sys import os @@ -46,6 +66,7 @@ os.environ['APPLICATION_ID'] = 'test-app-run' os.environ['USER_EMAIL'] = 'test@example.com' os.environ['CURRENT_VERSION_ID'] = 'testing-version' + os.environ['HTTP_HOST'] = 'some.testing.host.tld' import main as app_main from google.appengine.api import apiproxy_stub_map from google.appengine.api import datastore_file_stub @@ -65,7 +86,7 @@ apiproxy_stub_map.apiproxy.RegisterStub('mail', mail_stub.MailServiceStub()) import django.test.utils django.test.utils.setup_test_environment() - + from nose.plugins import cover plugin = cover.Coverage() nose.main(plugins=[AppEngineDatastoreClearPlugin(), plugin])