diff --git a/.github/workflows/plone-package.yml b/.github/workflows/plone-package.yml
index b5cca6d..2864464 100644
--- a/.github/workflows/plone-package.yml
+++ b/.github/workflows/plone-package.yml
@@ -13,6 +13,7 @@ env:
SALESFORCE_USERNAME: test@example.com
SALESFORCE_PASSWORD: bogus
SALESFORCE_TOKEN: bogus
+ SALESFORCE_DOMAIN: login
jobs:
build:
@@ -23,10 +24,6 @@ jobs:
include:
- python-version: 3.9
plone-version: 52
- - python-version: 2.7
- plone-version: 52
- - python-version: 2.7
- plone-version: 51
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
@@ -35,7 +32,7 @@ jobs:
~/.cache/pip
~/buildout-cache
~/extends
- key: ${{ runner.os }}-deps-cache-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/*.cfg') }} }}
+ key: ${{ runner.os }}-deps-cache-${{ hashFiles('setup.py') }}-${{ hashFiles('*.cfg') }} }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
@@ -55,3 +52,40 @@ jobs:
run: buildout -c test_plone${{ matrix.plone-version }}.cfg
- name: Run tests
run: bin/test
+
+ build-py27:
+ runs-on: ubuntu-20.04
+ container:
+ image: python:2.7.18-buster
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - python-version: 2.7
+ plone-version: 52
+ - python-version: 2.7
+ plone-version: 51
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/cache@v2
+ with:
+ path: |
+ ~/.cache/pip
+ ~/buildout-cache
+ ~/extends
+ key: ${{ runner.os }}-deps-cache-${{ hashFiles('setup.py') }}-${{ hashFiles('*.cfg') }} }}
+ - name: Install system libraries
+ run: apt-get install libxml2-dev libxslt1-dev libjpeg-dev
+ - name: setup buildout cache
+ run: |
+ mkdir -p ~/buildout-cache/{eggs,downloads}
+ mkdir ~/.buildout
+ echo "[buildout]" > $HOME/.buildout/default.cfg
+ echo "download-cache = $HOME/buildout-cache/downloads" >> $HOME/.buildout/default.cfg
+ echo "eggs-directory = $HOME/buildout-cache/eggs" >> $HOME/.buildout/default.cfg
+ - name: Install pip and zc.buildout
+ run: python -m pip install --upgrade pip wheel zc.buildout setuptools -c constraints_plone${{ matrix.plone-version }}.txt
+ - name: Run buildout
+ run: buildout -c test_plone${{ matrix.plone-version }}.cfg
+ - name: Run tests
+ run: bin/test
diff --git a/src/jazkarta/easyformplugin/salesforce/testing.py b/src/jazkarta/easyformplugin/salesforce/testing.py
index 3dae10a..2c01c2a 100644
--- a/src/jazkarta/easyformplugin/salesforce/testing.py
+++ b/src/jazkarta/easyformplugin/salesforce/testing.py
@@ -57,7 +57,7 @@ def setUpPloneSite(self, portal):
def scrub_login_request(request):
if request.body is not None:
request.body = re.sub(
- rb".*?",
+ br".*?",
lambda m: b"REDACTED",
request.body,
)
@@ -66,7 +66,7 @@ def scrub_login_request(request):
def scrub_login_response(response):
response["body"]["string"] = re.sub(
- rb".*?",
+ br".*?",
b"FAKE_SESSION",
response["body"]["string"],
)