예제 #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))
예제 #2
0
 def test_ok_check(self):
     """Passes through the OK response"""
     self.result.content = "OK"
     self.assertEqual("OK", http.ok_check(self.function)())
예제 #3
0
파일: test_clients.py 프로젝트: mxr/nsq-py
 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))
예제 #4
0
파일: test_clients.py 프로젝트: mxr/nsq-py
 def test_ok_check(self):
     '''Passes through the OK response'''
     self.result.content = 'OK'
     self.assertEqual('OK', http.ok_check(self.function)())
예제 #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))
예제 #6
0
 def test_ok_check(self):
     '''Passes through the OK response'''
     self.result.content = 'OK'
     self.assertEqual('OK', http.ok_check(self.function)())