Example #1
0
 def test_build_privmsgs_in_without_newline(self):
     fromm = 'f'
     to = 't'
     line = 'line1'
     result = weechat_otr.build_privmsgs_in(fromm, to, line)
     self.assertEqual(result,
             weechat_otr.build_privmsg_in(fromm, to, line))
Example #2
0
 def test_build_privmsgs_in_with_newline(self):
     fromm = 'f'
     to = 't'
     result = weechat_otr.build_privmsgs_in(fromm, to, 'line1\nline2')
     self.assertEqual(result, '{msg1}\r\n{msg2}'.format(
         msg1=weechat_otr.build_privmsg_in(fromm, to, 'line1'),
         msg2=weechat_otr.build_privmsg_in(fromm, to, 'line2')))
Example #3
0
 def test_build_privmsgs_in_without_newline_prefix(self):
     fromm = 'f'
     to = 't'
     line = 'line1'
     prefix = 'Some prefix: '
     result = weechat_otr.build_privmsgs_in(fromm, to, line, prefix)
     self.assertEqual(result,
             weechat_otr.build_privmsg_in(fromm, to, prefix+line))
Example #4
0
 def test_build_privmsgs_in_with_newline(self):
     fromm = 'f'
     to = 't'
     result = weechat_otr.build_privmsgs_in(fromm, to, 'line1\nline2')
     self.assertEqual(
         result, '{msg1}\r\n{msg2}'.format(
             msg1=weechat_otr.build_privmsg_in(fromm, to, 'line1'),
             msg2=weechat_otr.build_privmsg_in(fromm, to, 'line2')))
Example #5
0
 def test_build_privmsgs_in_without_newline_prefix(self):
     fromm = 'f'
     to = 't'
     line = 'line1'
     prefix = 'Some prefix: '
     result = weechat_otr.build_privmsgs_in(fromm, to, line, prefix)
     self.assertEqual(
         result,
         weechat_otr.build_privmsg_in(
             fromm, to, '{prefix}{line}'.format(prefix=prefix, line=line)))
Example #6
0
 def test_build_privmsgs_in_with_newline_prefix(self):
     fromm = 'f'
     to = 't'
     prefix = 'Some prefix: '
     result = weechat_otr.build_privmsgs_in(fromm, to, 'line1\nline2',
             prefix)
     self.assertEqual(result, '{msg1}\r\n{msg2}'.format(
         msg1=weechat_otr.build_privmsg_in(fromm, to,
             '{}line1'.format(prefix)),
         msg2=weechat_otr.build_privmsg_in(fromm, to,
             '{}line2'.format(prefix))))
Example #7
0
 def test_build_privmsgs_in_with_newline_prefix(self):
     fromm = 'f'
     to = 't'
     prefix = 'Some prefix: '
     result = weechat_otr.build_privmsgs_in(fromm, to, 'line1\nline2',
                                            prefix)
     self.assertEqual(
         result, '{msg1}\r\n{msg2}'.format(
             msg1=weechat_otr.build_privmsg_in(fromm, to,
                                               '{}line1'.format(prefix)),
             msg2=weechat_otr.build_privmsg_in(fromm, to,
                                               '{}line2'.format(prefix))))
Example #8
0
 def test_build_privmsgs_in_without_newline(self):
     fromm = 'f'
     to = 't'
     line = 'line1'
     result = weechat_otr.build_privmsgs_in(fromm, to, line)
     self.assertEqual(result, weechat_otr.build_privmsg_in(fromm, to, line))