Skip to content

Commit

Permalink
test: Fix test_endpoints expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jul 17, 2024
1 parent 3f4c1d2 commit dd2a39c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ def test_auth(self):
def test_launch_spider_get(self, mock_scrapyd):
resp = requests.get(mock_scrapyd.urljoin("schedule.json"))

assert resp.status_code == 200
# TODO scrapyd should return status 405 Method Not Allowed not 200
assert resp.status_code == 405
assert resp.json()['status'] == 'error'

def test_spider_list_no_project(self, mock_scrapyd):
Expand All @@ -78,8 +77,8 @@ def test_spider_list_project_no_egg(self, mock_scrapyd):
resp = requests.get(mock_scrapyd.urljoin('listprojects.json'))
data = resp.json()

assert resp.status_code == 400
assert data['status'] == 'error'
assert resp.status_code == 200
assert data['status'] == 'ok'

def test_addversion_and_delversion(self, mock_scrapyd, quotesbot_egg):
resp = self._deploy(mock_scrapyd, quotesbot_egg)
Expand Down

0 comments on commit dd2a39c

Please sign in to comment.