Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jayvdb
Copy link
Member

@jayvdb jayvdb commented Nov 29, 2017

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

@jayvdb
Copy link
Member Author

jayvdb commented Nov 29, 2017

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')
Copy link
Member

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')

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this?

Copy link
Member

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'
Copy link
Member

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

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants