Пример #1
0
    def test_get_mimetype_dir(self):
        path = "/foo/"

        mimetype = HttpServer.get_mimetype(path)

        self.assertIn(mimetype, [b"text/html", b"text/plain"])
Пример #2
0
    def test_get_mimetype_file(self):
        path = "/a_web_page.html"

        mimetype = HttpServer.get_mimetype(path)

        self.assertEqual(b"text/html", mimetype)