Skip to content

Commit 367add4

Browse files
committed
Clean up after a complex rebase
1 parent 6a82190 commit 367add4

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

tests/test_middleware.py

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -706,12 +706,6 @@ def test_slot_policy_single_slot():
706706
'slot_policy': scrapy_splash.SlotPolicy.SINGLE_SLOT
707707
}}
708708

709-
def test_slot_policy_single_slot():
710-
mw = _get_mw()
711-
meta = {'splash': {
712-
'slot_policy': scrapyjs.SlotPolicy.SINGLE_SLOT
713-
}}
714-
715709
req1 = scrapy.Request("http://example.com/path?key=value", meta=meta)
716710
req1 = mw.process_request(req1, None)
717711

@@ -721,16 +715,11 @@ def test_slot_policy_single_slot():
721715
assert req1.meta.get('download_slot')
722716
assert req1.meta['download_slot'] == req2.meta['download_slot']
723717

724-
def test_slot_policy_per_domain():
725-
mw = _get_mw()
726-
meta = {'splash': {
727-
'slot_policy': scrapy_splash.SlotPolicy.PER_DOMAIN
728-
}}
729718

730719
def test_slot_policy_per_domain():
731720
mw = _get_mw()
732721
meta = {'splash': {
733-
'slot_policy': scrapyjs.SlotPolicy.PER_DOMAIN
722+
'slot_policy': scrapy_splash.SlotPolicy.PER_DOMAIN
734723
}}
735724

736725
req1 = scrapy.Request("http://example.com/path?key=value", meta=meta)
@@ -748,18 +737,11 @@ def test_slot_policy_per_domain():
748737
assert req1.meta['download_slot'] == req2.meta['download_slot']
749738
assert req1.meta['download_slot'] != req3.meta['download_slot']
750739

751-
def test_slot_policy_scrapy_default():
752-
mw = _get_mw()
753-
req = scrapy.Request("http://example.com", meta = {'splash': {
754-
'slot_policy': scrapy_splash.SlotPolicy.SCRAPY_DEFAULT
755-
}})
756-
req = mw.process_request(req, None)
757-
assert 'download_slot' not in req.meta
758740

759741
def test_slot_policy_scrapy_default():
760742
mw = _get_mw()
761743
req = scrapy.Request("http://example.com", meta = {'splash': {
762-
'slot_policy': scrapyjs.SlotPolicy.SCRAPY_DEFAULT
744+
'slot_policy': scrapy_splash.SlotPolicy.SCRAPY_DEFAULT
763745
}})
764746
req = mw.process_request(req, None)
765747
assert 'download_slot' not in req.meta

0 commit comments

Comments
 (0)