def test_not_can_set_class(self):
     instance = self._makeOne()
     self.assertTrue(not instance.can_set_class(-1))
     self.assertTrue(not instance.can_set_class(2))
     from lobbypy.models import Player
     p1 = Player('0')
     p2 = Player('0')
     p1.id = 1
     p2.id = 2
     instance.join(p1)
     instance.join(p2)
     instance.players[0].class_id = 0
     instance.players[1].class_id = 0
     self.assertTrue(not instance.can_set_class(0))
     instance.players[0].class_id = 6
     self.assertTrue(not instance.can_set_class(6))
 def test_not_can_join(self):
     instance = self._makeOne()
     from lobbypy.models import Player
     for i in range(9):
         p = Player('%d' % i)
         p.id = i
         instance.join(p)
     self.assertTrue(not instance.can_join())
 def test_not_can_join(self):
     instance = self._makeOne()
     from lobbypy.models import Player
     for i in range(9):
         p = Player('%d' % i)
         p.id = i
         instance.join(p)
     self.assertTrue(not instance.can_join())
 def test_not_can_set_class(self):
     instance = self._makeOne()
     from lobbypy.models import Player
     for i in range(9):
         p = Player('%d' % i)
         p.id = i
         instance.join(p)
         instance.players[-1].class_id = i
     for i in range(9):
         self.assertTrue(not instance.can_set_class(i))
 def test_not_can_set_class(self):
     instance = self._makeOne()
     from lobbypy.models import Player
     for i in range(9):
         p = Player('%d' % i)
         p.id = i
         instance.join(p)
         instance.players[-1].class_id = i
     for i in range(9):
         self.assertTrue(not instance.can_set_class(i))