Skip to content

Commit

Permalink
Test py38 instead of py36 on CircleCI (#124)
Browse files Browse the repository at this point in the history
* Test py38 instead of py36 on CircleCI

* Update test_email_fail to ensure sending email fail
  • Loading branch information
my8100 committed Mar 1, 2020
1 parent 6d7c53a commit 0d714aa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 13 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,6 @@ jobs:
SCRAPYDWEB_TESTMODE: True
DATABASE_URL: 'mysql:https://root:[email protected]:3306'

py36-sqlite:
<<: *test-template
docker:
- image: circleci/python:3.6
environment:
SCRAPYDWEB_TESTMODE: True
DATA_PATH: '/home/circleci/repo/scrapydweb_data'
DATABASE_URL: 'sqlite:https:////home/circleci/repo/scrapydweb_database'
py37-git-postgresql:
<<: *test-template
docker:
Expand Down Expand Up @@ -259,6 +251,15 @@ jobs:
SCRAPYDWEB_TESTMODE: True
DATABASE_URL: 'mysql:https://root:[email protected]:3306'

py38-sqlite:
<<: *test-template
docker:
- image: circleci/python:3.6
environment:
SCRAPYDWEB_TESTMODE: True
DATA_PATH: '/home/circleci/repo/scrapydweb_data'
DATABASE_URL: 'sqlite:https:////home/circleci/repo/scrapydweb_database'


workflows:
test:
Expand All @@ -277,12 +278,13 @@ workflows:
use-mysql: true

- py37
- py36-sqlite:
set-data-path: true
use-sqlite: true
- py37-git-postgresql:
use-git: true
use-postgresql: true
- py37-git-mysql:
use-git: true
use-mysql: true

- py38-sqlite:
set-data-path: true
use-sqlite: true
2 changes: 1 addition & 1 deletion tests/test_send_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def check_pass(recipients=None, subject='Email from #scrapydweb', text=None):
def test_email_fail(app, client):
# EMAIL_RECIPIENTS invalid
# "reason": "{'1@2': (501, b'Bad address syntax')}"
req(app, client, view='sendtextapi', kws=dict(opt='email', recipients='1@2'),
req(app, client, view='sendtextapi', kws=dict(opt='email', recipients='1@invalid_recipients'),
jskws=dict(status=cst.ERROR), jskeys=['status', 'result', 'debug', 'when'],
ins='email_password', nos='Sent')

Expand Down

0 comments on commit 0d714aa

Please sign in to comment.