Exemplo n.º 1
0
 def assertCheck(self, successful, errors, successes, skips, warnings):
     output = TestOutput()
     check(output)
     self.assertEqual(output.successful, successful)
     self.assertEqual(output.errors, errors)
     self.assertEqual(output.successes, successes)
     self.assertEqual(output.skips, skips)
     self.assertEqual(output.warnings, warnings)
Exemplo n.º 2
0
 def assertCheck(self, successful, **assertions):
     """
     asserts that checks are successful or not
     Assertions is a mapping of numbers to check (eg successes=5)
     """
     output = TestOutput()
     check(output)
     self.assertEqual(output.successful, successful)
     for key, value in assertions.items():
         self.assertEqual(getattr(output, key), value, "%s %s expected, got %s" % (value, key, getattr(output, key)))
Exemplo n.º 3
0
 def assertCheck(self, successful, **assertions):
     """
     asserts that checks are successful or not
     Assertions is a mapping of numbers to check (eg successes=5)
     """
     output = TestOutput()
     check(output)
     self.assertEqual(output.successful, successful)
     for key, value in assertions.items():
         self.assertEqual(getattr(output, key), value, "%s %s expected, got %s" % (value, key, getattr(output, key)))
Exemplo n.º 4
0
 def handle(self, *args, **options):
     if not check(FileOutputWrapper(self.stdout, self.stderr)):
         raise CommandError()
Exemplo n.º 5
0
 def handle(self, *args, **options):
     if not check(FileOutputWrapper(self.stdout, self.stderr)):
         raise CommandError()