1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-22 17:44:00 +00:00
scrapy/tests/test_urlparse_monkeypatches.py
Chomba Ng'ang'a 4ca61a2051 Update deprecated test aliases
- change ``failIf`` to ``assertFalse``
- change ``asertEquals`` to ``assertEqual``
- change ``assert_`` to ``assertTrue``

https://docs.python.org/2/library/unittest.html#deprecated-aliases
2017-08-09 12:52:10 +02:00

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')