You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should create a unified backend that can be used by user defined nodes and allow intelligent mock.
With such backend we can easily test a channel without mock the whole node and be sure that all data are correctly read from node.
For example with http request backend with should be able to specify a response when we have a specific request.
Another example: file backend should be memory only to avoid writing file by mistake.
For file backend we can imagine something like that:
classFileBackend():
asyncdefopen(self, path, mode):
ifin_test_mode():
# TODO should verify file don't previously exists# or mock is defined especially for this pathmocked_file=StringIO()
self.open_files.append({
'path': path,
'mode': mode,
'file': mocked_file
)
returnmocked_fileelse:
returnopen(path, mode)
This mock should be used for every file modification in pypeman.
The text was updated successfully, but these errors were encountered:
For all IO:
We should create a unified backend that can be used by user defined nodes and allow intelligent mock.
With such backend we can easily test a channel without mock the whole node and be sure that all data are correctly read from node.
For example with http request backend with should be able to specify a response when we have a specific request.
Another example: file backend should be memory only to avoid writing file by mistake.
For file backend we can imagine something like that:
This mock should be used for every file modification in pypeman.
The text was updated successfully, but these errors were encountered: