Restored identity.wadl w/ system test
Change-Id: I03899a3cc842f8f8ddaaa26c7681dcda43c2bc17
This commit is contained in:
parent
4802e21919
commit
bd4f870f96
File diff suppressed because it is too large
Load Diff
|
@ -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
|
||||
|
|
|
@ -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()
|
Loading…
Reference in New Issue