File: test_http.py

package info (click to toggle)
python-mechanize 1%3A0.4.10%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,316 kB
  • sloc: python: 16,656; makefile: 11; sh: 4
file content (17 lines) | stat: -rw-r--r-- 443 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
# vim:fileencoding=utf-8
# Copyright: 2019, Kovid Goyal <kovid at kovidgoyal.net>


from unittest import TestCase

from mechanize._http import MechanizeRobotFileParser


class TestRobotFileParser(TestCase):

    def test_set_opener(self):
        rfp = MechanizeRobotFileParser()
        rfp.set_opener()
        q = '<mechanize._opener.OpenerDirector object at '
        self.assertTrue(repr(rfp._opener).startswith(q))