@@ -30,15 +30,17 @@ def _make_one(self, *args, **kw):
3030 return self ._get_target_class ()(* args , ** kw )
3131
3232 def test_constructor (self ):
33- from google .cloud .logging .handlers .app_engine import _GAE_PROJECT_ENV_FLEX
33+ from google .cloud .logging .handlers .app_engine import (
34+ _GAE_PROJECT_ENV_FLEX )
3435 from google .cloud .logging .handlers .app_engine import (
3536 _GAE_PROJECT_ENV_STANDARD )
3637 from google .cloud .logging .handlers .app_engine import _GAE_SERVICE_ENV
3738 from google .cloud .logging .handlers .app_engine import _GAE_VERSION_ENV
3839
3940 client = mock .Mock (project = self .PROJECT , spec = ['project' ])
4041
41- # Verify that project/service/version are picked up from the environment.
42+ # Verify that project/service/version are picked up from the
43+ # environment.
4244 with mock .patch ('os.environ' , new = {
4345 _GAE_PROJECT_ENV_STANDARD : 'test_project' ,
4446 _GAE_SERVICE_ENV : 'test_service' ,
@@ -51,8 +53,8 @@ def test_constructor(self):
5153 self .assertEqual (handler .resource .labels ['module_id' ], 'test_service' )
5254 self .assertEqual (handler .resource .labels ['version_id' ], 'test_version' )
5355
54- # Verify that _GAE_PROJECT_ENV_FLEX environment variable takes precedence
55- # over _GAE_PROJECT_ENV_STANDARD.
56+ # Verify that _GAE_PROJECT_ENV_FLEX environment variable takes
57+ # precedence over _GAE_PROJECT_ENV_STANDARD.
5658 with mock .patch ('os.environ' , new = {
5759 _GAE_PROJECT_ENV_FLEX : 'test_project_2' ,
5860 _GAE_PROJECT_ENV_STANDARD : 'test_project_should_be_overridden' ,
@@ -62,9 +64,12 @@ def test_constructor(self):
6264 handler = self ._make_one (client , transport = _Transport )
6365 self .assertIs (handler .client , client )
6466 self .assertEqual (handler .resource .type , 'gae_app' )
65- self .assertEqual (handler .resource .labels ['project_id' ], 'test_project_2' )
66- self .assertEqual (handler .resource .labels ['module_id' ], 'test_service_2' )
67- self .assertEqual (handler .resource .labels ['version_id' ], 'test_version_2' )
67+ self .assertEqual (
68+ handler .resource .labels ['project_id' ], 'test_project_2' )
69+ self .assertEqual (
70+ handler .resource .labels ['module_id' ], 'test_service_2' )
71+ self .assertEqual (
72+ handler .resource .labels ['version_id' ], 'test_version_2' )
6873
6974 def test_emit (self ):
7075 client = mock .Mock (project = self .PROJECT , spec = ['project' ])
0 commit comments