forked from hasgeek/funnel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add live server for browser tests (hasgeek#1439)
Also includes multiplexing app for dev and test runtime and direct invocation of pytest.
- Loading branch information
Showing
46 changed files
with
984 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,57 @@ | ||
# Run Flask in testing environment | ||
FLASK_ENV='testing' | ||
|
||
# Specify HOSTALIASES file for platforms that support it | ||
HOSTALIASES=${PWD}/HOSTALIASES | ||
|
||
# Mail settings | ||
MAIL_SERVER='localhost' | ||
MAIL_PORT=25 | ||
MAIL_DEFAULT_SENDER='[email protected]' | ||
SITE_SUPPORT_EMAIL='' | ||
ADMINS='' | ||
|
||
#: Keys for tests specifically | ||
# Keys for tests specifically | ||
FACEBOOK_OAUTH_TOKEN='' | ||
|
||
#: Twitter integration | ||
# Twitter integration | ||
OAUTH_TWITTER_KEY='' | ||
OAUTH_TWITTER_SECRET='' | ||
|
||
#: GitHub integration | ||
# GitHub integration | ||
OAUTH_GITHUB_KEY='' | ||
OAUTH_GITHUB_SECRET='' | ||
|
||
#: Google integration | ||
# Google integration | ||
OAUTH_GOOGLE_KEY='' | ||
OAUTH_GOOGLE_SECRET='' | ||
|
||
#: Recaptcha for the registration form | ||
# Recaptcha for the registration form | ||
RECAPTCHA_PUBLIC_KEY='' | ||
RECAPTCHA_PRIVATE_KEY='' | ||
|
||
#: Boxoffice settings for sync tests in Cypress | ||
# Boxoffice settings for sync tests in Cypress | ||
CYPRESS_BOXOFFICE_SECRET_KEY='' | ||
CYPRESS_BOXOFFICE_ACCESS_KEY'' | ||
CYPRESS_BOXOFFICE_IC_ID= | ||
CYPRESS_BOXOFFICE_CLIENT_ID='' | ||
|
||
#: Google Maps API key | ||
# Google Maps API key | ||
GOOGLE_MAPS_API_KEY='' | ||
|
||
#: YouTube API key | ||
# YouTube API key | ||
YOUTUBE_API_KEY='' | ||
|
||
#: Twilio SID | ||
# Twilio SID | ||
SMS_TWILIO_SID='' | ||
#: Twilio Token | ||
# Twilio Token | ||
SMS_TWILIO_TOKEN='' | ||
#: Twilio test number | ||
# Twilio test number | ||
SMS_TWILIO_FROM='+15005550006' | ||
|
||
#: Vimeo client id | ||
# Vimeo client id | ||
VIMEO_CLIENT_ID='' | ||
#: Vimeo client secret | ||
# Vimeo client secret | ||
VIMEO_CLIENT_SECRET='' | ||
#: Vimeo access token | ||
# Vimeo access token | ||
VIMEO_ACCESS_TOKEN='' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copy these entries into your /etc/hosts | ||
|
||
127.0.0.1 funnel.test | ||
127.0.0.1 f.test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env python | ||
"""Development server with multi-app switching.""" | ||
|
||
import os | ||
import sys | ||
|
||
from werkzeug import run_simple | ||
|
||
if __name__ == '__main__': | ||
sys.path.insert(0, os.path.dirname(__file__)) | ||
os.environ['FLASK_ENV'] = 'development' | ||
|
||
from funnel import rq | ||
from funnel.devtest import BackgroundWorker, devtest_app | ||
|
||
background_rq = None | ||
if os.environ.get('WERKZEUG_RUN_MAIN') == 'true': | ||
# Only start RQ worker within the reloader environment | ||
background_rq = BackgroundWorker(rq.get_worker().work) | ||
background_rq.start() | ||
|
||
run_simple( | ||
os.environ.get('FLASK_RUN_HOST', '127.0.0.1'), | ||
int(os.environ.get('FLASK_RUN_PORT', 3000)), | ||
devtest_app, | ||
use_reloader=True, | ||
use_debugger=True, | ||
use_evalex=True, | ||
threaded=True, | ||
) | ||
|
||
if background_rq: | ||
background_rq.stop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.