MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / test_sync_remove_team

Method test_sync_remove_team

unit-tests/test_sync_down.py:35–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

33 self.assert_key_unencrypted(params)
34
35 def test_sync_remove_team(self):
36 params = get_synced_params()
37 teams_to_delete = [x['team_uid'] for x in params.team_cache.values()]
38
39 with mock.patch('keepercommander.api.communicate_rest') as mock_comm:
40 rs = SyncDown_pb2.SyncDownResponse()
41 rs.continuationToken = crypto.get_random_bytes(64)
42 rs.removedTeams.extend((utils.base64_url_decode(x) for x in teams_to_delete))
43 mock_comm.return_value = rs
44 sync_down(params)
45
46 self.assertEqual(len(params.record_cache), 3)
47 self.assertEqual(len(params.team_cache), 0)
48 self.assert_key_unencrypted(params)
49
50 def test_sync_remove_shared_folder_then_team(self):
51 params = get_synced_params()

Callers

nothing calls this directly

Calls 3

get_synced_paramsFunction · 0.90
sync_downFunction · 0.50

Tested by

no test coverage detected