Skip to content

Commit

Permalink
tests: preferences: bugfix: use new test key in test_sc_object_set
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Mar 14, 2022
1 parent 6292fab commit a9c88ea
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/rpcclient/tests/test_preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,13 @@ def test_sc_object_set(client):
"""
:param rpcclient.client.Client client:
"""
model = client.preferences.sc.get_dict('preferences.plist')['Model']
try:
with client.preferences.sc.open('preferences.plist') as pref:
pref.set('Model', 'MyModel')
assert client.preferences.sc.get_dict('preferences.plist')['Model'] == 'MyModel'
pref.set('test', 'MyModel')
assert client.preferences.sc.get_dict('preferences.plist')['test'] == 'MyModel'
finally:
with client.preferences.sc.open('preferences.plist') as pref:
pref.set('Model', model)
pref.remove('test')


def test_sc_object_set_dict(client):
Expand Down

0 comments on commit a9c88ea

Please sign in to comment.