def test_get_clicked_button(self):
     button1 = MockDrawable("", 10, 10)
     button1.width = 10
     button1.height = 10
     button1.contains = self.no
     
     button2 = MockDrawable("", 50, 50)
     button2.width = 10
     button2.height = 10
     button2.contains = self.yes
     
     buttons = [button1, button2]
     handler = ButtonClickHandler(None, {})
     handler.buttons = buttons
     self.assertEqual(button2, handler.get_clicked_button((55, 55)))
 def create_image(self, imagefile, x, y):
     image = MockDrawable(imagefile, x, y)
     image.width = 50
     image.height = 50
     return image
 def create_text(self, text, x, y):
     text = MockDrawable(text, x, y)
     text.width = 50
     text.height = 25
     return text