@@ -94,12 +94,12 @@ class CET(_UTC):
9494 self .assertEqual (self ._call_fut (expiration_other ), cet_seconds )
9595
9696 def test_w_expiration_timedelta_seconds (self ):
97- dummy_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 )
98- utc_seconds = _utc_seconds (dummy_utcnow )
97+ fake_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 )
98+ utc_seconds = _utc_seconds (fake_utcnow )
9999 expiration_as_delta = datetime .timedelta (seconds = 10 )
100100
101101 patch = mock .patch (
102- "google.cloud.storage._signing.NOW" , return_value = dummy_utcnow
102+ "google.cloud.storage._signing.NOW" , return_value = fake_utcnow
103103 )
104104 with patch as utcnow :
105105 result = self ._call_fut (expiration_as_delta )
@@ -108,12 +108,12 @@ def test_w_expiration_timedelta_seconds(self):
108108 utcnow .assert_called_once_with ()
109109
110110 def test_w_expiration_timedelta_days (self ):
111- dummy_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 )
112- utc_seconds = _utc_seconds (dummy_utcnow )
111+ fake_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 )
112+ utc_seconds = _utc_seconds (fake_utcnow )
113113 expiration_as_delta = datetime .timedelta (days = 1 )
114114
115115 patch = mock .patch (
116- "google.cloud.storage._signing.NOW" , return_value = dummy_utcnow
116+ "google.cloud.storage._signing.NOW" , return_value = fake_utcnow
117117 )
118118 with patch as utcnow :
119119 result = self ._call_fut (expiration_as_delta )
@@ -138,13 +138,13 @@ def test_w_expiration_none(self):
138138 self ._call_fut (None )
139139
140140 def test_w_expiration_int_gt_seven_days (self ):
141- dummy_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 )
141+ fake_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 )
142142 delta = datetime .timedelta (days = 10 )
143- expiration_utc = dummy_utcnow + delta
143+ expiration_utc = fake_utcnow + delta
144144 expiration_seconds = _utc_seconds (expiration_utc )
145145
146146 patch = mock .patch (
147- "google.cloud.storage._signing.NOW" , return_value = dummy_utcnow
147+ "google.cloud.storage._signing.NOW" , return_value = fake_utcnow
148148 )
149149
150150 with patch as utcnow :
@@ -153,11 +153,11 @@ def test_w_expiration_int_gt_seven_days(self):
153153 utcnow .assert_called_once_with ()
154154
155155 def test_w_expiration_int (self ):
156- dummy_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 )
156+ fake_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 )
157157 expiration_seconds = 10
158158
159159 patch = mock .patch (
160- "google.cloud.storage._signing.NOW" , return_value = dummy_utcnow
160+ "google.cloud.storage._signing.NOW" , return_value = fake_utcnow
161161 )
162162
163163 with patch as utcnow :
@@ -167,12 +167,12 @@ def test_w_expiration_int(self):
167167 utcnow .assert_called_once_with ()
168168
169169 def test_w_expiration_naive_datetime (self ):
170- dummy_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 )
170+ fake_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 )
171171 delta = datetime .timedelta (seconds = 10 )
172- expiration_no_tz = dummy_utcnow + delta
172+ expiration_no_tz = fake_utcnow + delta
173173
174174 patch = mock .patch (
175- "google.cloud.storage._signing.NOW" , return_value = dummy_utcnow
175+ "google.cloud.storage._signing.NOW" , return_value = fake_utcnow
176176 )
177177 with patch as utcnow :
178178 result = self ._call_fut (expiration_no_tz )
@@ -183,12 +183,12 @@ def test_w_expiration_naive_datetime(self):
183183 def test_w_expiration_utc_datetime (self ):
184184 from google .cloud ._helpers import UTC
185185
186- dummy_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 , UTC )
186+ fake_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 , UTC )
187187 delta = datetime .timedelta (seconds = 10 )
188- expiration_utc = dummy_utcnow + delta
188+ expiration_utc = fake_utcnow + delta
189189
190190 patch = mock .patch (
191- "google.cloud.storage._signing.NOW" , return_value = dummy_utcnow
191+ "google.cloud.storage._signing.NOW" , return_value = fake_utcnow
192192 )
193193 with patch as utcnow :
194194 result = self ._call_fut (expiration_utc )
@@ -205,13 +205,13 @@ class CET(_UTC):
205205 _utcoffset = datetime .timedelta (hours = 1 )
206206
207207 zone = CET ()
208- dummy_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 , UTC )
209- dummy_cetnow = dummy_utcnow .astimezone (zone )
208+ fake_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 , UTC )
209+ fake_cetnow = fake_utcnow .astimezone (zone )
210210 delta = datetime .timedelta (seconds = 10 )
211- expiration_other = dummy_cetnow + delta
211+ expiration_other = fake_cetnow + delta
212212
213213 patch = mock .patch (
214- "google.cloud.storage._signing.NOW" , return_value = dummy_utcnow
214+ "google.cloud.storage._signing.NOW" , return_value = fake_utcnow
215215 )
216216 with patch as utcnow :
217217 result = self ._call_fut (expiration_other )
@@ -220,11 +220,11 @@ class CET(_UTC):
220220 utcnow .assert_called_once_with ()
221221
222222 def test_w_expiration_timedelta (self ):
223- dummy_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 )
223+ fake_utcnow = datetime .datetime (2004 , 8 , 19 , 0 , 0 , 0 , 0 )
224224 expiration_as_delta = datetime .timedelta (seconds = 10 )
225225
226226 patch = mock .patch (
227- "google.cloud.storage._signing.NOW" , return_value = dummy_utcnow
227+ "google.cloud.storage._signing.NOW" , return_value = fake_utcnow
228228 )
229229 with patch as utcnow :
230230 result = self ._call_fut (expiration_as_delta )
@@ -246,7 +246,7 @@ def test_it(self):
246246 credentials = _make_credentials (signer_email = account_name )
247247 credentials .sign_bytes .return_value = sig_bytes
248248 expiration = 100
249- string_to_sign = "dummy_signature "
249+ string_to_sign = "fake_signature "
250250 result = self ._call_fut (credentials , expiration , string_to_sign )
251251
252252 expected = {
@@ -770,20 +770,20 @@ def test_get_v4_now_dtstamps(self):
770770 self .assertEqual (datestamp , "20200312" )
771771
772772
773- _DUMMY_SERVICE_ACCOUNT = None
773+ _FAKE_SERVICE_ACCOUNT = None
774774
775775
776- def dummy_service_account ():
777- global _DUMMY_SERVICE_ACCOUNT
776+ def fake_service_account ():
777+ global _FAKE_SERVICE_ACCOUNT
778778
779779 from google .oauth2 .service_account import Credentials
780780
781- if _DUMMY_SERVICE_ACCOUNT is None :
782- _DUMMY_SERVICE_ACCOUNT = Credentials .from_service_account_info (
781+ if _FAKE_SERVICE_ACCOUNT is None :
782+ _FAKE_SERVICE_ACCOUNT = Credentials .from_service_account_info (
783783 _SERVICE_ACCOUNT_JSON
784784 )
785785
786- return _DUMMY_SERVICE_ACCOUNT
786+ return _FAKE_SERVICE_ACCOUNT
787787
788788
789789_API_ACCESS_ENDPOINT = "https://storage.googleapis.com"
@@ -792,7 +792,7 @@ def dummy_service_account():
792792def _run_conformance_test (
793793 resource , test_data , api_access_endpoint = _API_ACCESS_ENDPOINT
794794):
795- credentials = dummy_service_account ()
795+ credentials = fake_service_account ()
796796 url = Test_generate_signed_url_v4 ._call_fut (
797797 credentials ,
798798 resource ,
0 commit comments