Commit e5e019b0 by Tom Christie

Pull in David's initial oauth tests

parents d714901a fe7e3ba3
Tom Christie <tomchristie> - tom@tomchristie.com, @thisneonsoul
Tom Christie <tomchristie> - tom@tomchristie.com, @thisneonsoul - Author.
Paul Bagwell <pbgwl> - Suggestions & bugfixes.
Marko Tibold <markotibold> - Contributions & Providing the Jenkins CI Server.
Sébastien Piquemal <sebpiq> - Contributions.
Carmen Wick <cwick> - Bugfixes.
Alex Ehlke <aehlke> - Design Contributions.
Alen Mujezinovic <flashingpumpkin> - Contributions.
Carles Barrobés <txels> - HEAD support.
Michael Fötsch <mfoetsch> - File format support.
David Larlet <david> - OAuth support.
THANKS TO:
......
......@@ -84,7 +84,7 @@ TEMPLATE_DIRS = (
# Don't forget to use absolute paths, not relative paths.
)
INSTALLED_APPS = (
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
......@@ -95,8 +95,17 @@ INSTALLED_APPS = (
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'djangorestframework',
)
]
# OAuth support is optional, so we only test oauth if it's installed.
try:
import oauth_provider
except:
pass
else:
INSTALLED_APPS.append('oauth_provider')
# If we're running on the Jenkins server we want to archive the coverage reports as XML.
import os
if os.environ.get('HUDSON_URL', None):
TEST_RUNNER = 'xmlrunner.extra.djangotestrunner.XMLTestRunner'
......
......@@ -24,9 +24,5 @@ class ReverseTests(TestCase):
urls = 'djangorestframework.tests.reverse'
def test_reversed_urls_are_fully_qualified(self):
try:
response = self.client.get('/')
except:
import traceback
traceback.print_exc()
self.assertEqual(json.loads(response.content), 'http://testserver/another')
# For the examples we need Django, pygments and httplib2...
# Pygments for the code highlighting example,
# markdown for the docstring -> auto-documentation
Django==1.2.4
wsgiref==0.1.2
Pygments==1.4
httplib2==0.6.0
Markdown==2.0.3
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment