Moving __author__ after imports in tests/.

Both test_appengine.py and test_django_orm.py still fail E402 since
they have some environment fixes during import (e.g.
dev_appserver.fix_sys_path() and changes to django.conf.global_settings)
This commit is contained in:
Danny Hermes
2015-08-20 14:07:57 -07:00
parent 28445b98bb
commit bbbcfecda3
11 changed files with 31 additions and 22 deletions

View File

@@ -12,11 +12,12 @@
"""Test Package set up."""
__author__ = 'afshar@google.com (Ali Afshar)'
import oauth2client.util
__author__ = 'afshar@google.com (Ali Afshar)'
def setup_package():
"""Run on testing package."""
oauth2client.util.positional_parameters_enforcement = 'EXCEPTION'

View File

@@ -19,8 +19,6 @@
Unit tests for objects created from discovery documents.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import datetime
import httplib2
import json
@@ -67,6 +65,9 @@ from oauth2client.client import flow_from_clientsecrets
from oauth2client.client import save_to_well_known_file
from webtest import TestApp
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')

View File

@@ -19,8 +19,6 @@
Unit tests for objects created from discovery documents.
"""
__author__ = 'conleyo@google.com (Conley Owens)'
import base64
import imp
import os
@@ -50,6 +48,9 @@ from oauth2client.django_orm import CredentialsField
from oauth2client.django_orm import FlowField
__author__ = 'conleyo@google.com (Conley Owens)'
class TestCredentialsField(unittest.TestCase):
def setUp(self):

View File

@@ -19,8 +19,6 @@
Unit tests for oauth2client.file
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import copy
import datetime
import json
@@ -46,6 +44,8 @@ try:
except:
pass
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
FILENAME = tempfile.mktemp('oauth2client_test.data')

View File

@@ -14,8 +14,6 @@
"""Unit tests for the Flask utilities"""
__author__ = 'jonwayne@google.com (Jon Wayne Parrott)'
import httplib2
import json
import unittest
@@ -32,6 +30,9 @@ from oauth2client.flask_util import UserOAuth2 as FlaskOAuth2
from oauth2client.client import OAuth2Credentials
__author__ = 'jonwayne@google.com (Jon Wayne Parrott)'
class Http2Mock(object):
"""Mock httplib2.Http for code exchange / refresh"""

View File

@@ -17,8 +17,6 @@
Unit tests for oauth2client.gce.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import json
from six.moves import urllib
import unittest
@@ -33,6 +31,9 @@ from oauth2client.client import save_to_well_known_file
from oauth2client.gce import AppAssertionCredentials
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
class AssertionCredentialsTests(unittest.TestCase):
def _refresh_success_helper(self, bytes_response=False):

View File

@@ -19,8 +19,6 @@
Unit tests for oauth2client.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import os
import mock
import sys
@@ -40,6 +38,9 @@ from oauth2client import crypt
from oauth2client.file import Storage
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
def datafile(filename):
f = open(os.path.join(os.path.dirname(__file__), 'data', filename), 'rb')
data = f.read()

View File

@@ -17,8 +17,6 @@
Unit tests for oauth2client.keyring_storage.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import datetime
import keyring
import unittest
@@ -30,6 +28,9 @@ from oauth2client.client import OAuth2Credentials
from oauth2client.keyring_storage import Storage
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
class OAuth2ClientKeyringTests(unittest.TestCase):
def test_non_existent_credentials_storage(self):

View File

@@ -19,8 +19,6 @@
Unit tests for oauth2client.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import base64
import contextlib
import datetime
@@ -81,6 +79,8 @@ from oauth2client.client import save_to_well_known_file
from oauth2client.clientsecrets import _loadfile
from oauth2client.service_account import _ServiceAccountCredentials
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')

View File

@@ -1,12 +1,13 @@
"""Unit tests for oauth2client.util."""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import unittest
from oauth2client import util
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
class ScopeToStringTests(unittest.TestCase):
def test_iterables(self):

View File

@@ -16,8 +16,6 @@
Unit tests for oauth2client.xsrfutil.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import unittest
from oauth2client import xsrfutil
@@ -33,6 +31,9 @@ TEST_EXTRA_INFO_1 = 'extra_info_1'
TEST_EXTRA_INFO_2 = 'more_extra_info'
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
class XsrfUtilTests(unittest.TestCase):
"""Test xsrfutil functions."""