Coverage for tests/test_creepo.py: 100%
16 statements
« prev ^ index » next coverage.py v7.4.0, created at 2024-01-03 18:52 -0500
« prev ^ index » next coverage.py v7.4.0, created at 2024-01-03 18:52 -0500
1"""
2A Creepo test suite
3"""
4import os
5import sys
7import cherrypy
8from cherrypy.test import helper
11sys.path.insert(0, os.path.abspath(
12 os.path.join(os.path.dirname(__file__), "..")))
14import creepo.rest # pylint: disable=wrong-import-position
17class SimpleCherryPyTest(helper.CPWebCase):
18 """
19 An entry point into the test suite
20 """
21 @staticmethod
22 def setup_server():
23 """
24 Setup the server
25 """
26 cherrypy.tree.mount(creepo.rest.Creepo(), '/', {})
28 def test_hello(self):
29 """
30 Test the hello endpoint
31 """
32 self.getPage("/hello")
33 self.assertStatus('200 OK')
35 def test_generate_does_not_exist(self):
36 """
37 Prove (more or less) that this is the server we think we are testing
38 """
39 self.getPage("/generate")
40 self.assertStatus('404 Not Found')