Skip to content
Merged
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
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Configure Dependabot scanning.
version: 2

updates:
# Check for updates to GitHub Actions.
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
groups:
github-actions:
patterns:
- "*"
25 changes: 25 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Python package

on:
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh
- name: Test with tox
run: tox -e ${{ matrix.python-version }}
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

## v5.0.0 - 10 Apr, 2018

* Drop offical support for Python 2.6
* Drop official support for Python 2.6
* Add a client-side timeout setting to `CreateSend`
* No breaking changes for Python2.7 or Python3.x

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def test_add_with_custom_fields(self):
self.subscriber.stub_request("subscribers/%s.json" % self.list_id, "add_subscriber.json")
custom_fields = [ { "Key": 'website', "Value": 'http://example.com/' } ]
email_address = self.subscriber.add(self.list_id, "subscriber@example.com", "Subscriber", custom_fields, True)
self.assertEquals(email_address, "subscriber@example.com")
self.assertEqual(email_address, "subscriber@example.com")
```

## Contributing
Expand Down
3 changes: 0 additions & 3 deletions nosetests.py

This file was deleted.

2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
"Programming Language :: Python :: 3",

# Specifically, we support the following releases.
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
4 changes: 2 additions & 2 deletions test/test_administrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ def test_delete(self):
email_address = self.administrator.delete()


class OAuthAdministatorTestCase(unittest.TestCase, AdministratorTestCase):
class OAuthAdministratorTestCase(unittest.TestCase, AdministratorTestCase):
"""Test when using OAuth to authenticate"""

def setUp(self):
self.administrator = Administrator(
{"access_token": "ASP95S4aR+9KsgfHB0dapTYxNA==", "refresh_token": "5S4aASP9R+9KsgfHB0dapTYxNA=="}, "admin@example.com")


class ApiKeyAdministatorTestCase(unittest.TestCase, AdministratorTestCase):
class ApiKeyAdministratorTestCase(unittest.TestCase, AdministratorTestCase):
"""Test when using an API key to authenticate"""

def setUp(self):
Expand Down
23 changes: 16 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
# Tox (http://tox.testrun.org/) is a tool for running tests
# Tox (https://tox.wiki/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
envlist = py36, py37, py38, py39, py310, py311, py312, py313
env_list = py38, py39, py310, py311, py312, py313

[testenv]
install_command=pip install {packages}
commands =
coverage run --source=lib setup.py test
coverage report
pytest --cov=lib
deps =
coverage
-e.
pytest-cov
# This needs to be set to include the test fixtures
use_develop = true

[gh]
# Maps python versions for GitHub workflow
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313