-
Notifications
You must be signed in to change notification settings - Fork 103
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
WIP: labhub: Allow missing username and msg link #417
base: master
Are you sure you want to change the base?
Conversation
The mocking isnt working :/ |
Some backends do not provide usernames or msg links. Zulip and Slack both using msg.extra['url'], and a patch is pending for the gitter backend to follow suite. errbotio/err-backend-gitter#32 Fixes coala#392 Related to coala#255
testbot.assertCommand('!new issue repository.github.io another title\nand body', | ||
'Here you go') | ||
msg = Message('!new issue repository.github.io another title\nand body', | ||
'Here you go') |
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.
@jayvdb Invalid command args, it can be like
msg = Message('!new issue repository.github.io another title\nand body')
testbot.assertCommand(msg.body, 'Here you go')
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.
Did you test this?
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.
I didn't, I can say that from the errbot documentation, just change constructor and add assert command.
'Here you go') | ||
msg.extras['url'] = 'http://example.com' | ||
msg.frm = testbot.bot.build_identifier('Jo') | ||
msg.frm._nick = 'jo' |
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.
msg.frm._nick
--> msg.frm.nick
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.
I am pretty sure it is a non-writable property.
Some backends do not provide usernames or msg links.
Zulip and Slack both using msg.extra['url'], and a
patch is pending for the gitter backend to follow suite.
errbotio/err-backend-gitter#32
Fixes #392
Related to #255