Mercurial > cgi-bin > hgweb.cgi > tincan
view tests/suite_02_good_errors/__init__.py @ 72:e8b3b336e63e draft default tip
Update version.
author | David Barts <n5jrn@me.com> |
---|---|
date | Mon, 15 Jul 2019 13:17:48 -0700 |
parents | 88adf10be709 |
children |
line wrap: on
line source
# I m p o r t s import os, sys import requests from .. import ServerFixture, RoutesFixture # C l a s s e s class Fixture01(ServerFixture): # There should be no errors when we load this. def runTest(self): self.assertEqual(self.errors, 0) class Fixture02(RoutesFixture): # Request something that doesn't exist. We should get our custom error # page. def test_01_404(self): response = requests.get("http://localhost:{0}/boogers/".format(self.port)) self.assertEqual(response.status_code, 404) self.assertTrue("I/O, I/O, it’s off to disk I go!" in response.text)