-
Notifications
You must be signed in to change notification settings - Fork 270
Add a function to send input to a running process. #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
My suggestion is that we create a release for this once checked in. |
@diyan , I'm having some difficulties understanding your unit tests, it would appear that you have mocked the function for returning a message, but the response is predetermined off of what the message being sent was. I'm not sure how the xml in these sections should look. Can you lend a hand and tell me how I can figure out how I can patch the tests to get this function checked in or finish up the tests yourself? |
@rustyscottweber The XML location currently is at https://github.com/diyan/pywinrm/blob/master/winrm/tests/conftest.py . These are just mocked responses, and what I believe how py.test sets up each test. That said, I am hoping to redo how the unit tests are done. The initial PR is #270 . Feel free to look over that as well if you have any comments, I think once that is merged...I hope it will be a little easier to understand/write tests. |
If that is the case, should I even worry about the unit test and just check
in code as is?
…On Sun, Aug 11, 2019, 10:25 Brian Price ***@***.***> wrote:
@rustyscottweber <https://github.com/rustyscottweber> The XML location
currently is at
https://github.com/diyan/pywinrm/blob/master/winrm/tests/conftest.py .
These are just mocked responses, and what I believe how py.test sets up
each test.
That said, I am hoping to redo how the unit tests are done. The initial PR
is #270 <#270> . Feel free to look
over that as well if you have any comments, I think once that is merged...I
hope it will be a little easier to understand/write tests.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#271?email_source=notifications&email_token=ABDUWG2DJAWKC5FH4BR7YMLQEA4PRA5CNFSM4IK2QOMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4BEBAY#issuecomment-520241283>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABDUWGZ7JA72LKJF7WUBAIDQEA4PRANCNFSM4IK2QOMA>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And yes, please include unit tests. At the very least, it should ensure the code works.
Looking at conftest.py, you will have the provide the proper request xml(i.e. the one you are creating) and return a response. I think you tie it all in over here: https://github.com/diyan/pywinrm/blob/master/winrm/tests/conftest.py#L332-L352
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great if you could also add the tests for some of the encoding examples I had in my comments.
…checking that is needed.
…nd unicode strings.
Are there any more outstanding issues? Or can this be merged? |
I believe that there are no longer any outstanding issues. Is there anything else that needs to be reviewed before merging? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issues I had have been fixed, up to @badcure to do the final merge once he's ready.
This should put to rest Issue 72. This expands the capabilities of pywinrm to be able to send input to an already running process.