From 83cd439edeeb13462428fd93403a0927e9267168 Mon Sep 17 00:00:00 2001 From: Joe Gregorio Date: Mon, 20 Jun 2011 10:11:35 -0400 Subject: [PATCH] Add another test. --- tests/test_oauth2client.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_oauth2client.py b/tests/test_oauth2client.py index 417807a..de11810 100644 --- a/tests/test_oauth2client.py +++ b/tests/test_oauth2client.py @@ -112,9 +112,16 @@ class AccessTokenCredentialsTests(unittest.TestCase): ({'status': '400'}, ''), ]) http = self.credentials.authorize(http) - resp, content = http.request("http://example.com") + resp, content = http.request('http://example.com') self.assertEqual(400, resp.status) + def test_auth_header_sent(self): + http = HttpMockSequence([ + ({'status': '200'}, 'echo_request_headers'), + ]) + http = self.credentials.authorize(http) + resp, content = http.request('http://example.com') + self.assertEqual(content['authorization'], 'OAuth foo') class TestAssertionCredentials(unittest.TestCase): assertion_text = "This is the assertion"