mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-22 17:44:00 +00:00
- change ``failIf`` to ``assertFalse`` - change ``asertEquals`` to ``assertEqual`` - change ``assert_`` to ``assertTrue`` https://docs.python.org/2/library/unittest.html#deprecated-aliases
13 lines
373 B
Python
13 lines
373 B
Python
from six.moves.urllib.parse import urlparse
|
|
import unittest
|
|
|
|
|
|
class UrlparseTestCase(unittest.TestCase):
|
|
|
|
def test_s3_url(self):
|
|
p = urlparse('s3://bucket/key/name?param=value')
|
|
self.assertEqual(p.scheme, 's3')
|
|
self.assertEqual(p.hostname, 'bucket')
|
|
self.assertEqual(p.path, '/key/name')
|
|
self.assertEqual(p.query, 'param=value')
|