def test_get_oauth_flow_with_file(self): gviews_v4.CLIENT_SECRETS_FILENAME = os.path.join( 'tests', 'client_secrets_test.json') flow = gviews_v4._get_oauth_flow() self.assertEqual(flow.client_id, '123.apps.googleusercontent.com') self.assertEqual(flow.client_secret, 'pass') self.assertEqual(flow.scope, gviews_v4.SCOPE) self.assertEqual(flow.redirect_uri, 'url')
def test_get_oauth_flow_with_conf(self): flow = gviews_v4._get_oauth_flow() self.assertEqual(flow.client_id, '123') self.assertEqual(flow.client_secret, 'pass') self.assertEqual(flow.scope, gviews_v4.SCOPE) self.assertEqual(flow.redirect_uri, 'url')
def test_get_oauth_flow_no_conf_secret_var(self): with self.assertRaises(ImproperlyConfigured): gviews_v4._get_oauth_flow()