Add HTTP_HOST to environ variables mocked. Also add license headers to run.py.
authorAugie Fackler <durin42@gmail.com>
Sat, 06 Jun 2009 10:30:56 -0500
changeset 2402 c4958af14634
parent 2401 bf70c5a0ef66
child 2403 92cfd29a363d
Add HTTP_HOST to environ variables mocked. Also add license headers to run.py.
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" <durin42@gmail.com>',
+  ]
+
 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])