Ejemplo n.º 1
0
 def test_ok_check_raises_exception(self):
     """Raises an exception if the respons is not OK"""
     self.result.content = "NOT OK"
     self.assertRaisesRegexp(http.ClientException, "NOT OK", http.ok_check(self.function))
Ejemplo n.º 2
0
 def test_ok_check(self):
     """Passes through the OK response"""
     self.result.content = "OK"
     self.assertEqual("OK", http.ok_check(self.function)())
Ejemplo n.º 3
0
 def test_ok_check_raises_exception(self):
     '''Raises an exception if the respons is not OK'''
     self.result.content = 'NOT OK'
     self.assertRaisesRegexp(http.ClientException, 'NOT OK',
                             http.ok_check(self.function))
Ejemplo n.º 4
0
 def test_ok_check(self):
     '''Passes through the OK response'''
     self.result.content = 'OK'
     self.assertEqual('OK', http.ok_check(self.function)())
Ejemplo n.º 5
0
 def test_ok_check_raises_exception(self):
     '''Raises an exception if the respons is not OK'''
     self.result.content = 'NOT OK'
     self.assertRaisesRegexp(
         http.ClientException, 'NOT OK', http.ok_check(self.function))
Ejemplo n.º 6
0
 def test_ok_check(self):
     '''Passes through the OK response'''
     self.result.content = 'OK'
     self.assertEqual('OK', http.ok_check(self.function)())