Return None if the decorator threadlocal store doesn't have flow or credentials.
Reviewed in https://codereview.appspot.com/12377044/.
diff --git a/tests/test_oauth2client_appengine.py b/tests/test_oauth2client_appengine.py
index 79657e0..4b2c414 100644
--- a/tests/test_oauth2client_appengine.py
+++ b/tests/test_oauth2client_appengine.py
@@ -505,6 +505,8 @@
def test_required(self):
# An initial request to an oauth_required decorated path should be a
# redirect to start the OAuth dance.
+ self.assertEqual(self.decorator.flow, None)
+ self.assertEqual(self.decorator.credentials, None)
response = self.app.get('http://localhost/foo_path')
self.assertTrue(response.status.startswith('302'))
q = parse_qs(response.headers['Location'].split('?', 1)[1])