Exemplo n.º 1
0
 def testWidgetBang(self):
     toy = widget.Widget()
     self.assertEqual(toy.bang(), 'bang bang!')
     self.assertEqual(toy.bang('boom'), 'boom bang!')
Exemplo n.º 2
0
 def testWidgetWhack(self):
     toy = widget.Widget()
     self.assertEqual(toy.whack(), 'whack!')
     self.assertEqual(toy.whack(3), 'whack! whack! whack!')
Exemplo n.º 3
0
 def __init__(self):
     self.widget = widget.Widget()
     self.desired_widget_count = 10
Exemplo n.º 4
0
 def collect_widgets(self):
     """Returns all the widgets the Collector wants."""
     return [widget.Widget() for _ in range(self.desired_widget_count)]
Exemplo n.º 5
0
 def testWidgetBang(self):
     toy = widget.Widget()
     self.assertEqual(toy.bang(), "bang bang!")
     self.assertEqual(toy.bang("boom"), "boom bang!")