2727TEST_OWLBOT = Path (__file__ ).parent .parent / "resources" / "test-owlbot"
2828FIXTURES = Path (__file__ ).parent .parent / "resources" / "test-owlbot" / "fixtures"
2929TEMPLATES_PATH = Path (__file__ ).parent .parent .parent / "owlbot" / "templates"
30+ TEST_CURRENT_YEAR = 2025
3031
3132SAMPLE_METADATA = """
3233<metadata>
@@ -172,7 +173,7 @@ def test_deprecate_method(self):
172173 )
173174 os .chdir (cwd )
174175
175- @mock .patch (java .CURRENT_YEAR , 2025 )
176+ @mock .patch (" java.CURRENT_YEAR" , TEST_CURRENT_YEAR )
176177 def test_fix_proto_license (self ):
177178 with tempfile .TemporaryDirectory () as tempdir :
178179 cwd = os .getcwd ()
@@ -189,7 +190,7 @@ def test_fix_proto_license(self):
189190 )
190191 os .chdir (cwd )
191192
192- @mock .patch (java .CURRENT_YEAR , 2025 )
193+ @mock .patch (" java.CURRENT_YEAR" , TEST_CURRENT_YEAR )
193194 def test_fix_proto_license_idempotent (self ):
194195 with tempfile .TemporaryDirectory () as tempdir :
195196 cwd = os .getcwd ()
@@ -208,7 +209,7 @@ def test_fix_proto_license_idempotent(self):
208209 )
209210 os .chdir (cwd )
210211
211- @mock .patch (java .CURRENT_YEAR , 2025 )
212+ @mock .patch (" java.CURRENT_YEAR" , TEST_CURRENT_YEAR )
212213 def test_fix_grpc_license (self ):
213214 with tempfile .TemporaryDirectory () as tempdir :
214215 cwd = os .getcwd ()
@@ -225,7 +226,7 @@ def test_fix_grpc_license(self):
225226 )
226227 os .chdir (cwd )
227228
228- @mock .patch (java .CURRENT_YEAR , 2025 )
229+ @mock .patch (" java.CURRENT_YEAR" , TEST_CURRENT_YEAR )
229230 def test_fix_grpc_license_idempotent (self ):
230231 with tempfile .TemporaryDirectory () as tempdir :
231232 cwd = os .getcwd ()
0 commit comments