Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)