File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -41,5 +41,5 @@ def readme():
4141 'Topic :: Internet :: WWW/HTTP :: Dynamic Content' ,
4242 'Topic :: Software Development :: Libraries :: Python Modules'
4343 ],
44- test_suite = 'tests.test_autodoc ' ,
44+ test_suite = 'tests' ,
4545)
Original file line number Diff line number Diff line change 1+ import unittest
2+
3+ from flask import Flask
4+ from flask .ext .autodoc import Autodoc
5+
6+
7+ class TestAutodocWithFlask (unittest .TestCase ):
8+ def setUp (self ):
9+ self .app = Flask (__name__ )
10+ self .autodoc = Autodoc (self .app )
11+
12+ @self .app .route ('/' )
13+ @self .autodoc .doc ()
14+ def index ():
15+ """Returns a hello world message"""
16+ return 'Hello World!'
17+
18+ self .client = self .app .test_client ()
19+
20+ def test_html (self ):
21+ @self .app .route ('/docs' )
22+ def html_docs ():
23+ return self .autodoc .html ()
24+
25+ response = self .client .get ('/docs' )
26+ self .assertEqual (response .status_code , 200 )
You can’t perform that action at this time.
0 commit comments