witten
/
luminotes
Archived
1
0
Fork 0
This repository has been archived on 2023-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
luminotes/controller/test/Test_root.py

35 lines
751 B
Python

import cherrypy
from Test_controller import Test_controller
class Test_root( Test_controller ):
def setUp( self ):
Test_controller.setUp( self )
def test_index( self ):
result = self.http_get( "/" )
assert result
def test_next_id( self ):
result = self.http_get( "/next_id" )
assert result.get( "next_id" )
result = self.http_get( "/next_id" )
assert result.get( "next_id" )
def test_404( self ):
result = self.http_get( "/four_oh_four" )
body = result.get( u"body" )
assert len( body ) > 0
assert u"404" in body[ 0 ]
status = result.get( u"status" )
assert u"404" in status
headers = result.get( u"headers" )
status = headers.get( u"status" )
assert u"404" in status