def test_isNotMe_WithMe(self): m = mock.Mock() octgn = mock.Mock() player = mock.Mock() octgn.configure_mock( **{'me' : player}) im = isNotMe(m) self.assertRaises(ValueError, im, octgn=octgn, player=player) self.assertFalse(m.called)
def test_isNotMe(self): m = mock.Mock() octgn = mock.Mock() player = mock.Mock() octgn.configure_mock( **{'me' : mock.Mock()}) im = isNotMe(m) im( **{'octgn':octgn, 'player':player}) self.assertTrue(m.called)