65 self.assertEqual(parse_accept_header('ISO-8859-1,utf-8;q=0.7,*;q=0.7'), |
65 self.assertEqual(parse_accept_header('ISO-8859-1,utf-8;q=0.7,*;q=0.7'), |
66 [('ISO-8859-1', 'ISO-8859-1', 1.0), |
66 [('ISO-8859-1', 'ISO-8859-1', 1.0), |
67 ('utf-8', 'utf-8', 0.7), |
67 ('utf-8', 'utf-8', 0.7), |
68 ('*', '*', 0.7)]) |
68 ('*', '*', 0.7)]) |
69 |
69 |
|
70 |
|
71 class WebRequestTC(TestCase): |
|
72 |
70 def test_base_url(self): |
73 def test_base_url(self): |
71 dummy_vreg = type('DummyVreg', (object,), {})() |
74 dummy_vreg = type('DummyVreg', (object,), {})() |
72 dummy_vreg.config = FakeConfig() |
75 dummy_vreg.config = FakeConfig() |
73 dummy_vreg.config['base-url'] = 'http://babar.com/' |
76 dummy_vreg.config['base-url'] = 'http://babar.com/' |
74 dummy_vreg.config['https-url'] = 'https://toto.com/' |
77 dummy_vreg.config['https-url'] = 'https://toto.com/' |