Initial attempt at creating incidents when an URL becomes unhealthy. Missing to actually call it from the scheduler. #3

This commit is contained in:
Mitsuo Takaki
2016-05-16 01:31:53 -07:00
parent 9c8c89c1dd
commit 0f53ff8678
6 changed files with 129 additions and 53 deletions

View File

@@ -77,11 +77,11 @@ class RegexTest(unittest.TestCase):
self.expectation = Regex({'type': 'REGEX', 'regex': '.*(find stuff).*'})
def test_init(self):
assert self.expectation.regex == re.compile('.*(find stuff).*')
assert self.expectation.regex == re.compile('.*(find stuff).*', re.UNICODE + re.DOTALL)
def test_get_status_healthy(self):
request = mock.Mock()
request.text = 'We could find stuff in this body.'
request.text = 'We could find stuff\n in this body.'
assert self.expectation.get_status(request) == 1