Skip to content

Commit

Permalink
tested configuration in server
Browse files Browse the repository at this point in the history
  • Loading branch information
heynemann committed Jun 20, 2013
1 parent 181842d commit fb34dc1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from preggy import expect

from tests.sandbox.server import SandboxServer
from tests.sandbox.config import Config


class TestHealthCheck(AsyncHTTPTestCase):
Expand All @@ -15,3 +16,14 @@ def test_healthcheck(self):
response = self.fetch('/healthcheck')
expect(response.code).to_equal(200)
expect(response.body).to_be_like('WORKING')


class TestHealthCheckWithCustomString(AsyncHTTPTestCase):
def get_app(self):
cfg = Config(HEALTHCHECK_TEXT='SOMETHING ELSE')
return SandboxServer(config=cfg).application

def test_healthcheck(self):
response = self.fetch('/healthcheck')
expect(response.code).to_equal(200)
expect(response.body).to_be_like('SOMETHING ELSE')

0 comments on commit fb34dc1

Please sign in to comment.