Closed sambuddhabasu closed 9 years ago
@meejah In commit https://github.com/sammyshj/txtorcon/commit/f9d771fa3fa1bc24e39358e56e1d4b957bc751d4, I have added a basic parse_get_info() method. This method now handles both single line and multiline responses. However, the the method is still in initial stage and hence, the tests fail. Let me know what you think about this and whether we should move forward with this. Thanks
@meejah When the https://github.com/meejah/txtorcon/blob/master/test/test_torcontrolprotocol.py#L430 test is run, should the response be a\nb\nc
, or the current response mentioned that is \na\nb\nc
?
I think there should be a leading newline like the test says... why?
Okay I need to make necessary changes to the test https://github.com/sammyshj/txtorcon/commit/711ed48acc2f60e4595452115d039479bcd1d7b9#diff-87729881434e634ea8b65a976a61f2efR608 then
@meejah In commit https://github.com/sammyshj/txtorcon/commit/95d8557b5dc72b19b513d29c89da8192e99d3a37, the parsing is now done by first splitting the lines based on the newline character and then forming the dict by looking if the key is present in the passed arguments.
Now only one test fails, https://github.com/meejah/txtorcon/blob/master/test/test_torcontrolprotocol.py#L578
This is because we pass the argument as FOO
however when the parsing is done, it finds the key as a
which is not in the passed arguments and hence it fails. It expects the response to be, 250-FOO=one
Let me know what should be done about this test.
Thanks
Yeah broken test; change it to ask for "a" or answer with "FOO", whichever. Thanks! I'll look at the rest in a little while...
@meejah Fixed the test. Now, all the tests pass on Travis CI. Let me know if the code looks good to be merged and I will go ahead and squash all the commits into one.
@meejah Squashed all the commits. The PR can be merged now :)
Added the descriptor get_info() test. The test presently fails and work needs to be done on the parse_keywords() and get_info() method for the test to pass. This will be reflected in the next commits.