Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Delete some cruft. #257

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
},
"addons": ["heroku-postgresql:in-dyno", "heroku-redis:in-dyno"],
"env": {
"DJANGO_SETTINGS_MODULE": "config.settings.test"
}
}
}
Expand Down
18 changes: 6 additions & 12 deletions config/settings/integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,8 @@
}
}

# django-debug-toolbar
# ------------------------------------------------------------------------------
MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"]
INSTALLED_APPS += ["debug_toolbar"]

INTERNAL_IPS = ["127.0.0.1", "10.0.2.2"]

DEBUG_TOOLBAR_CONFIG = {
"DISABLE_PANELS": ["debug_toolbar.panels.redirects.RedirectsPanel"],
"SHOW_TEMPLATE_CONTEXT": True,
}

# django-extensions
# ------------------------------------------------------------------------------
INSTALLED_APPS += ["django_extensions"]
Expand Down Expand Up @@ -79,9 +69,13 @@
# Salesforce
SALESFORCE_CLIENT_ID = env("SALESFORCE_CLIENT_ID")
SALESFORCE_JWT_PRIVATE_KEY = process_key(env("SALESFORCE_JWT_PRIVATE_KEY"))
SALESFORCE_SANDBOX = env.bool("SALESFORCE_SANDBOX")
print(r"YYYXXXXX - SALESFORCE_SANDBOX: {env('SALESFORCE_SANDBOX')} Bool: {env.bool('SALESFORCE_SANDBOX')} " )
SALESFORCE_SANDBOX = env.bool("SALESFORCE_SANDBOX", True)
import sys
sys.stderr.write(r"YYYXXXXX - SALESFORCE_SANDBOX: {env('SALESFORCE_SANDBOX')} Bool: {env.bool('SALESFORCE_SANDBOX')} ")
assert SALESFORCE_SANDBOX
SALESFORCE_USERNAME = env("SALESFORCE_USERNAME")

assert False
# django-rq
REDIS_URL = env("REDIS_URL", default="redis://localhost:6379")
REDIS_URL += "/1"
Expand Down
2 changes: 2 additions & 0 deletions sfdoc/publish/salesforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def get_salesforce_api():
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
auth_url = urljoin(url, 'services/oauth2/token')
response = requests.post(url=auth_url, data=data, headers=headers)
SANDBOX = settings.SALESFORCE_SANDBOX
print("XXXX - LOGGING IN", vars())
response.raise_for_status() # maybe VPN or auth problem!
response_data = response.json()
return SimpleSalesforce(
Expand Down
1 change: 1 addition & 0 deletions sfdoc/publish/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def checkTestEnvironment():
"""Several checks of the intention of the end-user to really obliterate
their org."""
assert settings.RUN_INTEGRATION_TESTS
assert settings.SALESFORCE_SANDBOX
assert "test_" in connection.settings_dict["NAME"]
assert os.environ.get("OKAY_TO_DELETE_SALESFORCE_KNOWLEDGE_ARTICLES"), (
"Running integration tests require destructive changes to your SF instance!\n"
Expand Down