Exemplo n.º 1
0
 def test_list_subclass(self):
     m = Mock()
     m.aCall()
     self.checkRaises(
         [call.bCall()], m.method_calls,
         'sequence not as expected:\n\nsame:\n[]\n\nfirst:\n[call.bCall()]\n\nsecond:\n[call.aCall()]'
     )
Exemplo n.º 2
0
 def test_list_subclass(self):
     m = Mock()
     m.aCall()
     # Mock().method_calls is a list subclass
     self.checkRaises([call.bCall()], m.method_calls,
                      "sequence not as expected:\n\n"
                      "same:\n[]\n\n"
                      "first:\n[call.bCall()]\n\n"
                      "second:\n[call.aCall()]")
Exemplo n.º 3
0
 def test_list_subclass(self):
     m = Mock()
     m.aCall()
     self.checkRaises(
         [call.bCall()], m.method_calls,
         "Sequence not as expected:\n\n"
         "same:\n[]\n\n"
         "first:\n[call.bCall()]\n\n"
         "second:\n[call.aCall()]"
         )