1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-24 09:23:57 +00:00

9 Commits

Author SHA1 Message Date
Vostretsov Nikita
b364d27247 [MRG+1] Automatic port selection for servicies in unit tests (#3210)
* ability to pass port as a parameter

* try to find free ports

* use environment variables to pass mock server address

* get mock server address from environment variables

* ability to select ports for proxy in runtime

* use common method for URLs from mock server

* https support

* get mock server address

* get mock address

* replace hand-written mechanism by kernel-based one

* use ephemeral ports in mockserver

* strip EOL from addresses

* use ephemeral port in proxy

* no need to restore environment as it is restored in tearDown

* decode bytes

* use mockserver address as a variable

* ability to pass address as variable

* per test-case mockserver

* use base class

* remove obsolete environment manipulation

* return usage of proxy for http cases

* common method for broking proxy auth credentials

* python version-independent url methods
2018-05-23 21:25:50 +03:00
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
Mikhail Korobov
26c1256f95 HttpErrorMiddleware stats 2017-02-22 17:36:25 +05:00
Paul Tremberth
81a0e3cd93 Raise log level for HttpErrorMiddleware to INFO (from DEBUG)
Fixes GH-910
2016-09-20 13:44:21 +02:00
Julia Medina
d3f576a816 Move scrapy/spider.py to scrapy/spiders/__init__.py 2015-05-09 04:20:09 -03:00
Julia Medina
180272c092 Move scrapy/contrib/spidermiddleware to scrapy/spidermiddlewares 2015-04-29 21:26:35 -03:00
Julia Medina
c2d716807a Use LogCapture in testfixtures package for tests
This allows to remove `get_testlog` helper, `flushLoggedErrors` from
twisted.trial.unittest.TestCase and Twisted log observers created for
each test on conftest.py.
2015-04-22 17:24:40 -03:00
Julia Medina
870438e5f4 Update tests utils, fixing get_crawler and removing docrawl 2014-08-12 14:02:56 -03:00
Daniel Graña
242c08553f move tests under root dir 2014-07-30 19:45:08 -03:00