Example #1
0
 def test_user_settings_save(self):
     user = User('user', Color.RED)
     settings_menu = SettingsMenu(10, 10, user, lambda: print(''))
     settings_menu.textBoxDict['Name'].text = 'GalconPlayer'
     settings_menu.get_color_button().color_p = Color.PURPLE
     settings_menu.validate()
     self.assertEqual(settings_menu.user.name,
                      settings_menu.get_text_box('Name'))
     self.assertEqual(settings_menu.user.color, Color.PURPLE)
Example #2
0
 def test_creation_settings_menu(self):
     user = User('user', Color.RED)
     settings_menu = SettingsMenu(10, 10, user, None)
     self.assertEqual(settings_menu.get_text_box('Name'), user.name)
     self.assertEqual(settings_menu.get_color_button().color_p, user.color)