Restored identity.wadl w/ system test

Change-Id: I03899a3cc842f8f8ddaaa26c7681dcda43c2bc17
This commit is contained in:
Dolph Mathews 2011-07-27 14:57:55 -05:00 committed by James E. Blair
parent 4802e21919
commit bd4f870f96
3 changed files with 1045 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@ class StaticFilesController(wsgi.Controller):
@utils.wrap_error
def get_wadl_contract(self, req):
resp = Response()
return template.static_file(resp, req, "identity.wadl",
return template.static_file(resp, req, "content/identity.wadl",
root=utils.get_app_root(), mimetype="application/vnd.sun.wadl+xml")
@utils.wrap_error

View File

@ -0,0 +1,20 @@
import unittest
from common import KeystoneTestCase
class TestStaticFiles(KeystoneTestCase):
def test_pdf_contract(self):
r = self.admin_request(path='/identitydevguide.pdf')
self.assertTrue('pdf' in r.getheader('Content-Type'))
def test_wadl_contract(self):
r = self.admin_request(path='/identity.wadl')
self.assertTrue('xml' in r.getheader('Content-Type'))
# def test_xsd_contract(self):
# self.admin_request(path='/xsd/something')
# def test_xsd_atom_contract(self):
# self.admin_request(path='/xsd/atom/something')
if __name__ == '__main__':
unittest.main()