Commit a40d7ae
fix: AccessEntry API representation parsing (#1682)
* fix: AccessEntry API representation parsing
Overriding the `AccessEntry#_properties` with a deep copy of the API resource overwrites the `role` property set in `AccessEntry.__init__` which isn't present in the resource if the `role` is set to `None`. This causes `AccessEntry`s generated from API representations to no longer evaluate to equal with equivalent `AccessEntry` resources instantiated through `AccessEntry.__init__`. The added unit test fails without the change and passes with the change.
* build: formatting
---------
Co-authored-by: Lingqing Gan <lingqing.gan@gmail.com>1 parent 8f187e6 commit a40d7aeCopy full SHA for a40d7ae
File tree
Expand file treeCollapse file tree
2 files changed
+17
-3
lines changedOpen diff view settings
Filter options
- google/cloud/bigquery
- tests/unit
Expand file treeCollapse file tree
2 files changed
+17
-3
lines changedOpen diff view settings
Collapse file
google/cloud/bigquery/dataset.py
Copy file name to clipboardExpand all lines: google/cloud/bigquery/dataset.py+1-3Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
501 | 501 | |
502 | 502 | |
503 | 503 | |
504 | | - |
505 | | - |
506 | | - |
| 504 | + |
507 | 505 | |
508 | 506 | |
509 | 507 | |
|
Collapse file
+16Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
152 | 152 | |
153 | 153 | |
154 | 154 | |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
155 | 171 | |
156 | 172 | |
157 | 173 | |
|
0 commit comments