def test_meta_point_init(self): chat_msg = ":[email protected] PRIVMSG #hwangbroxd :!addpoints gay_zach 2" msg = commands.Message(chat_msg) assert msg.command == 'addpoints' assert msg.points_user == 'gay_zach' assert msg.points_amount == 2 assert msg.is_admin
def test_admin_command_init(self): chat_msg = ":[email protected] PRIVMSG #hwangbroxd :!add !test Kappa" msg = commands.Message(chat_msg) assert msg.command == 'add' assert msg.is_admin == True assert msg.metacommand == 'test' assert msg.command_body == 'Kappa'
def test_basic_init(self): chat_msg = ":[email protected] PRIVMSG #hwangbroxd :test" msg = commands.Message(chat_msg) assert msg.username == 'hwangbroxd' assert msg.message == 'test' assert msg.command == '' assert msg.metacommand == '' assert msg.command_body == '' assert msg.points_user == '' assert msg.is_command == False assert msg.is_admin == True assert msg.points_amount == 0
def test_remove(self): chat_msg = ":[email protected] PRIVMSG #hwangbroxd :!remove !test" msg = commands.Message(chat_msg) output = commands.handle_meta_command(msg) assert output == "You've successfully removed the command test"
def test_edit(self): chat_msg = ":[email protected] PRIVMSG #hwangbroxd :!edit !test KappaPride" msg = commands.Message(chat_msg) output = commands.handle_meta_command(msg) assert output == "You've successfully edited the command test"
def test_challenge_init(self): chat_msg = ":[email protected] PRIVMSG #hwangbroxd :!challenge gay_zach 20" msg = commands.Message(chat_msg) assert msg.points_amount == 20 assert msg.points_user == 'gay_zach'
def test_gamble_init(self): chat_msg = ":[email protected] PRIVMSG #hwangbroxd :!gamble 20" msg = commands.Message(chat_msg) assert msg.points_amount == 20
def test_point_init(self): chat_msg = ":[email protected] PRIVMSG #hwangbroxd :!points" msg = commands.Message(chat_msg) assert msg.command == 'points' assert msg.points_amount == 0
def test_command_init(self): chat_msg = ":[email protected] PRIVMSG #hwangbroxd :!commands" msg = commands.Message(chat_msg) assert msg.command == 'commands'