Exemplo n.º 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))
Exemplo n.º 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')))
Exemplo n.º 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))
Exemplo n.º 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')))
Exemplo n.º 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)))
Exemplo n.º 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))))
Exemplo n.º 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))))
Exemplo n.º 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))