kalsi-avneet / py-fossology

Python wrapper around FOSSology's REST API
MIT License
3 stars 0 forks source link

Update object's properties as well after a resource is modified on the server #6

Closed kalsi-avneet closed 5 years ago

kalsi-avneet commented 5 years ago

When a property of a resource is modified on the server via an object, the object's properties do not contain the updated values eg:

>>> from fossology import Fossology
>>> fossology = Fossology(server='http://localhost:8085/repo/',  auth={'username':'fossy', 'password':'fossy', 'token_expire':'2019-09-07', 'token_scope':'write'})
>>> top_folder=fossology.folder(folder_id=1)
>>> top_folder.description
'Top Folder'
>>> top_folder.edit_description('Modified description')
True
>>> top_folder.description
'Top Folder'                      # <-----This should be 'Modified description'
>>> top_folder_2=fossology.folder(folder_id=1)
>>> top_folder_2.description
'Modified description'      #  <----- A new object pointing to the same resource has the expected properties
>>> 
kalsi-avneet commented 5 years ago

Fixed in 3364d3b

The following was modified: