Skip to content

Commit 2272d47

Browse files
authored
[SYNPY-1714] Fix Issues with Failing Tests (#1287)
* always log warning * check assert called with * patch object on class instance * Revert "always log warning" This reverts commit ae63c81. * update patch target * re-add erroneously removed line
1 parent 4d082c3 commit 2272d47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/unit/synapseclient/unit_test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ def init_syn(self, syn: Synapse) -> None:
11721172
self.syn.credentials = SynapseAuthTokenCredentials(token="abc", username="def")
11731173

11741174
def test_check_entity_restrictions_no_unmet_restriction(self) -> None:
1175-
with patch("logging.Logger.warning") as mocked_warn:
1175+
with patch.object(self.syn.logger, "warning") as mocked_warn:
11761176
bundle = {
11771177
"entity": {
11781178
"id": "syn123",
@@ -1189,7 +1189,7 @@ def test_check_entity_restrictions_no_unmet_restriction(self) -> None:
11891189
def test_check_entity_restrictions_unmet_restriction_entity_file_with_download_file_is_true(
11901190
self,
11911191
) -> None:
1192-
with patch("logging.Logger.warning") as mocked_warn:
1192+
with patch.object(self.syn.logger, "warning") as mocked_warn:
11931193
bundle = {
11941194
"entity": {
11951195
"id": "syn123",

0 commit comments

Comments
 (0)