From bd4f870f96501eb3912c8177cd8a5830451b313e Mon Sep 17 00:00:00 2001 From: Dolph Mathews Date: Wed, 27 Jul 2011 14:57:55 -0500 Subject: Restored identity.wadl w/ system test Change-Id: I03899a3cc842f8f8ddaaa26c7681dcda43c2bc17 --- keystone/content/identity.wadl | 1024 +++++++++++++++++++++++++++++ keystone/controllers/staticfiles.py | 2 +- keystone/test/system/test_static_files.py | 20 + 3 files changed, 1045 insertions(+), 1 deletion(-) create mode 100644 keystone/content/identity.wadl create mode 100644 keystone/test/system/test_static_files.py diff --git a/keystone/content/identity.wadl b/keystone/content/identity.wadl new file mode 100644 index 00000000..18d6e872 --- /dev/null +++ b/keystone/content/identity.wadl @@ -0,0 +1,1024 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keystone/controllers/staticfiles.py b/keystone/controllers/staticfiles.py index 43bcb4a7..8a97cfb2 100644 --- a/keystone/controllers/staticfiles.py +++ b/keystone/controllers/staticfiles.py @@ -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 diff --git a/keystone/test/system/test_static_files.py b/keystone/test/system/test_static_files.py new file mode 100644 index 00000000..bb8232f7 --- /dev/null +++ b/keystone/test/system/test_static_files.py @@ -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() -- cgit