def test_no_hello(self): channel = mock.Mock() receivers.hello(None, "Freddy", channel, True) self.assertEqual(channel.msg.called, False)
def test_hello(self): channel = mock.Mock() receivers.hello(None, "Freddy", channel, False) self.assertTrue("Freddy" in channel.msg.call_args[0][0])