Skip to content

Commit 872478f

Browse files
author
Arnaud Coomans
committed
Added tests for location
1 parent 6f6b659 commit 872478f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_autodoc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def index():
2828
self.assertEqual(d['rule'], '/')
2929
self.assertEqual(d['endpoint'], 'index')
3030
self.assertEqual(d['docstring'], 'Returns a hello world message')
31+
self.assertIsInstance(d['location']['line'], int)
32+
self.assertIn(__file__, d['location']['filename'])
3133
self.assertFalse(d['defaults'])
3234

3335
def testPost(self):
@@ -46,6 +48,8 @@ def index():
4648
self.assertEqual(d['rule'], '/')
4749
self.assertEqual(d['endpoint'], 'index')
4850
self.assertEqual(d['docstring'], 'Returns a hello world message')
51+
self.assertIsInstance(d['location']['line'], int)
52+
self.assertIn(__file__, d['location']['filename'])
4953
self.assertFalse(d['defaults'])
5054

5155
def testParams(self):

0 commit comments

Comments
 (0)