Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Commit

Permalink
Test for X-Frame-Options header
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Wenzel committed Aug 24, 2010
1 parent f2364b5 commit 8e261ec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/sso/tests.py
Expand Up @@ -24,3 +24,9 @@ def test_httponly(self):
for name in r.cookies:
if name not in settings.JAVASCRIPT_READABLE_COOKIES:
eq_(bool(r.cookies[name].get('httponly')), True)

def test_x_frame_options(self):
"""Ensure our pages must not be iframed."""
r = self.client.get(reverse('cas_login'))
eq_(r.status_code, 200)
eq_(r['x-frame-options'], 'DENY')

0 comments on commit 8e261ec

Please sign in to comment.