Example #1
0
 def test_no_method(self):
     # An object without the method is ignored.
     self.objects.append(self.make_object('Obj3', has_method=False))
     backend.call_methods(self.objects, 'method')
     expected = [['Obj1', ()], ['Obj2', ()]]
     self.assertEqual(expected, self.called)
Example #2
0
 def test_call(self):
     # The methods are correctly called.
     backend.call_methods(self.objects, 'method', 'arg1', 'arg2')
     expected = [['Obj1', ('arg1', 'arg2')], ['Obj2', ('arg1', 'arg2')]]
     self.assertEqual(expected, self.called)
Example #3
0
 def test_no_method(self):
     # An object without the method is ignored.
     self.objects.append(self.make_object('Obj3', has_method=False))
     backend.call_methods(self.objects, 'method')
     expected = [['Obj1', ()], ['Obj2', ()]]
     self.assertEqual(expected, self.called)
Example #4
0
 def test_call(self):
     # The methods are correctly called.
     backend.call_methods(self.objects, 'method', 'arg1', 'arg2')
     expected = [['Obj1', ('arg1', 'arg2')], ['Obj2', ('arg1', 'arg2')]]
     self.assertEqual(expected, self.called)
Example #5
0
 def test_no_method(self):
     # An object without the method is ignored.
     self.objects.append(self.make_object("Obj3", has_method=False))
     backend.call_methods(self.objects, "method")
     expected = [["Obj1", ()], ["Obj2", ()]]
     self.assertEqual(expected, self.called)
Example #6
0
 def test_call(self):
     # The methods are correctly called.
     backend.call_methods(self.objects, "method", "arg1", "arg2")
     expected = [["Obj1", ("arg1", "arg2")], ["Obj2", ("arg1", "arg2")]]
     self.assertEqual(expected, self.called)