def test_empty_version(self):
     sys.modules['weechat'].infos[('', )]['version_number'] = ''
     sys.modules['weechat'].infos[('', )]['version'] = ''
     self.assertFalse(weechat_otr.weechat_version_ok())
     self.assertPrinted(
         '',
         'otr requires WeeChat version >= 0.4.2. The current version is .')
Пример #2
0
 def test_ok(self):
     sys.modules['weechat'].infos[('',)]['version_number'] = 0x01000100
     sys.modules['weechat'].infos[('',)]['version'] = '1.0.1'
     self.assertTrue(weechat_otr.weechat_version_ok())
     self.assertNotPrinted('',
         'otr requires WeeChat version >= 0.4.2. The current version is '
         '1.0.1.')
Пример #3
0
 def test_too_low(self):
     sys.modules['weechat'].infos[('',)]['version_number'] = 0x00030800
     sys.modules['weechat'].infos[('',)]['version'] = '0.4.1'
     self.assertFalse(weechat_otr.weechat_version_ok())
     self.assertPrinted('',
         'otr requires WeeChat version >= 0.4.2. The current version is '
         '0.4.1.')
Пример #4
0
 def test_empty_version(self):
     sys.modules['weechat'].infos[('',)]['version_number'] = ''
     sys.modules['weechat'].infos[('',)]['version'] = ''
     self.assertFalse(weechat_otr.weechat_version_ok())
     self.assertPrinted('',
         'otr requires WeeChat version >= 0.4.2. The current version is '
         '.')
 def test_ok(self):
     sys.modules['weechat'].infos[('', )]['version_number'] = 0x01000100
     sys.modules['weechat'].infos[('', )]['version'] = '1.0.1'
     self.assertTrue(weechat_otr.weechat_version_ok())
     self.assertNotPrinted(
         '',
         'otr requires WeeChat version >= 0.4.2. The current version is '
         '1.0.1.')
 def test_too_low(self):
     sys.modules['weechat'].infos[('', )]['version_number'] = 0x00030800
     sys.modules['weechat'].infos[('', )]['version'] = '0.4.1'
     self.assertFalse(weechat_otr.weechat_version_ok())
     self.assertPrinted(
         '',
         'otr requires WeeChat version >= 0.4.2. The current version is '
         '0.4.1.')