Skip to content

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