Exemple #1
0
 def test_format_mismatches_list(self):
     errors = [
         IscsiConnection.Mismatch("error 1"),
         IscsiConnection.Mismatch("error 2")
     ]
     expected = "%s" % ["error 1", "error 2"]
     self.assertEqual(str(errors), expected)
Exemple #2
0
 def test_format(self):
     s = str(IscsiConnection.Mismatch("error %d with %r", 1, "text"))
     self.assertEqual(s, "error 1 with 'text'")
Exemple #3
0
 def test_no_args(self):
     s = str(IscsiConnection.Mismatch("error 1"))
     self.assertEqual(s, "error 1")