MCPcopy
hub / github.com/aio-libs/aiohttp / test_static_route_user_home

Method test_static_route_user_home

tests/test_urldispatch.py:878–885  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

876 self.assertIsInstance(self.router.resources(), Container)
877
878 def test_static_route_user_home(self):
879 here = pathlib.Path(aiohttp.__file__).parent
880 home = pathlib.Path(os.path.expanduser('~'))
881 if not str(here).startswith(str(home)): # pragma: no cover
882 self.skipTest("aiohttp folder is not placed in user's HOME")
883 static_dir = '~/' + str(here.relative_to(home))
884 route = self.router.add_static('/st', static_dir)
885 self.assertEqual(here, route.get_info()['directory'])
886
887 def test_static_route_points_to_file(self):
888 here = pathlib.Path(aiohttp.__file__).parent / '__init__.py'

Callers

nothing calls this directly

Calls 2

add_staticMethod · 0.80
get_infoMethod · 0.45

Tested by

no test coverage detected