/usr/lib/python3/dist-packages/pydap/tests/test_webtest.py is in python3-pydap 3.2.2+ds1-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from webtest import TestApp as App
import unittest
def MyApp(environ, start_response):
start_response('200 OK', [('content-type', 'text/plain; charset=utf-8')])
yield 'foo\n'.encode('utf-8')
yield 'bar\n'.encode('utf-8')
yield 'baz\n'.encode('utf-8')
class MyTest(unittest.TestCase):
def setUp(self):
self.app = App(MyApp)
def test_webtest(self):
expected = 'foo\nbar\nbaz\n'
self.assertEqual(self.app.get('/').text, expected)
|