File: test_urlparse_monkeypatches.py

package info (click to toggle)
python-scrapy 0.24.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,240 kB
  • ctags: 4,259
  • sloc: python: 21,170; xml: 199; makefile: 67; sh: 44
file content (12 lines) | stat: -rw-r--r-- 363 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
from urlparse import urlparse
import unittest


class UrlparseTestCase(unittest.TestCase):

    def test_s3_url(self):
        p = urlparse('s3://bucket/key/name?param=value')
        self.assertEquals(p.scheme, 's3')
        self.assertEquals(p.hostname, 'bucket')
        self.assertEquals(p.path, '/key/name')
        self.assertEquals(p.query, 'param=value')