~ubuntu-branches/ubuntu/precise/gozerbot/precise

« back to all changes in this revision

Viewing changes to tests/test_bot.py

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Malcolm
  • Date: 2008-06-02 19:26:39 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080602192639-3rn65nx4q1sgd6sy
Tags: 0.8.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# tests/test_bot.py
 
2
#
 
3
#
 
4
 
 
5
__copyright__ = 'this file is in the public domain'
 
6
 
 
7
from gozerbot.bot import Bot
 
8
import unittest
 
9
 
 
10
class test_bot(unittest.TestCase):
 
11
 
 
12
    def test_connect(self):
 
13
        b = Bot()
 
14
        b.connect('gozertest', 'localhost')
 
15
        self.assert_(b.connected == True)
 
16
 
 
17
    def test_reconnect(self):
 
18
        b = Bot()
 
19
        b.connect('gozertest', 'localhost')
 
20
        b.connectok.wait()
 
21
        b.reconnect()
 
22
        self.assert_(b.connected == True)