Skip to content

Commit a66e3db

Browse files
committed
Fix VERSION fixtures in several tests
A recent change to iam objects in API core started causing an error if accessing those objects as dicts, if their version is > 1. This commit addresses that by setting the VERSION to 1 in fixtures.
1 parent c25d741 commit a66e3db

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

storage/tests/unit/test_blob.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1928,7 +1928,7 @@ def test_get_iam_policy(self):
19281928
BLOB_NAME = "blob-name"
19291929
PATH = "/b/name/o/%s" % (BLOB_NAME,)
19301930
ETAG = "DEADBEEF"
1931-
VERSION = 17
1931+
VERSION = 1
19321932
OWNER1 = "user:[email protected]"
19331933
OWNER2 = "group:[email protected]"
19341934
EDITOR1 = "domain:google.com"
@@ -1980,7 +1980,7 @@ def test_get_iam_policy_w_user_project(self):
19801980
USER_PROJECT = "user-project-123"
19811981
PATH = "/b/name/o/%s" % (BLOB_NAME,)
19821982
ETAG = "DEADBEEF"
1983-
VERSION = 17
1983+
VERSION = 1
19841984
RETURNED = {
19851985
"resourceId": PATH,
19861986
"etag": ETAG,
@@ -2023,7 +2023,7 @@ def test_set_iam_policy(self):
20232023
BLOB_NAME = "blob-name"
20242024
PATH = "/b/name/o/%s" % (BLOB_NAME,)
20252025
ETAG = "DEADBEEF"
2026-
VERSION = 17
2026+
VERSION = 1
20272027
OWNER1 = "user:[email protected]"
20282028
OWNER2 = "group:[email protected]"
20292029
EDITOR1 = "domain:google.com"
@@ -2074,7 +2074,7 @@ def test_set_iam_policy_w_user_project(self):
20742074
USER_PROJECT = "user-project-123"
20752075
PATH = "/b/name/o/%s" % (BLOB_NAME,)
20762076
ETAG = "DEADBEEF"
2077-
VERSION = 17
2077+
VERSION = 1
20782078
BINDINGS = []
20792079
RETURNED = {"etag": ETAG, "version": VERSION, "bindings": BINDINGS}
20802080
after = ({"status": http_client.OK}, RETURNED)

storage/tests/unit/test_bucket.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,7 @@ def test_get_iam_policy(self):
20232023
NAME = "name"
20242024
PATH = "/b/%s" % (NAME,)
20252025
ETAG = "DEADBEEF"
2026-
VERSION = 17
2026+
VERSION = 1
20272027
OWNER1 = "user:[email protected]"
20282028
OWNER2 = "group:[email protected]"
20292029
EDITOR1 = "domain:google.com"
@@ -2067,7 +2067,7 @@ def test_get_iam_policy_w_user_project(self):
20672067
USER_PROJECT = "user-project-123"
20682068
PATH = "/b/%s" % (NAME,)
20692069
ETAG = "DEADBEEF"
2070-
VERSION = 17
2070+
VERSION = 1
20712071
RETURNED = {
20722072
"resourceId": PATH,
20732073
"etag": ETAG,
@@ -2102,7 +2102,7 @@ def test_set_iam_policy(self):
21022102
NAME = "name"
21032103
PATH = "/b/%s" % (NAME,)
21042104
ETAG = "DEADBEEF"
2105-
VERSION = 17
2105+
VERSION = 1
21062106
OWNER1 = "user:[email protected]"
21072107
OWNER2 = "group:[email protected]"
21082108
EDITOR1 = "domain:google.com"
@@ -2155,7 +2155,7 @@ def test_set_iam_policy_w_user_project(self):
21552155
USER_PROJECT = "user-project-123"
21562156
PATH = "/b/%s" % (NAME,)
21572157
ETAG = "DEADBEEF"
2158-
VERSION = 17
2158+
VERSION = 1
21592159
OWNER1 = "user:[email protected]"
21602160
OWNER2 = "group:[email protected]"
21612161
EDITOR1 = "domain:google.com"

0 commit comments

Comments
 (0)