Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

SWI-4593 Add test workflow #27

Merged
merged 26 commits into from
Feb 16, 2024
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
42 changes: 42 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test

on:
schedule:
- cron: "0 4 * * *"
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
deploy:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: [3.5]
fail-fast: false
env:
PYTHON_VERSION: ${{ matrix.python-version }}
OPERATING_SYSTEM: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Packages
run: |
pip install -e git+https://github.com/bandwidthcom/python-bandwidth-iris#egg=iris_sdk
pip install -r requirements.txt

- name: Test
run: |
python -m unittest discover
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Needed tools

- Python 2.7, or 3.3/3.4
- Python 3.5
- pip

## Requires
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ certifi==2019.11.28
chardet==3.0.4
future==0.18.3
idna==2.8
requests==2.31.0
urllib3==1.26.5
requests==2.22.0
urllib3==1.25.11
mock==3.0.5
requests-mock==1.7.0
six==1.13.0
8 changes: 4 additions & 4 deletions tests/test_disconnects.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,16 @@ def test_disconnect_create(self):
self.assertEqual(disconnect.order_status, "RECEIVED")

def test_disconnect_get(self):

disconnect = self._account.disconnects.create({"order_id":
"b902dee1-0585-4258-becd-5c7e51ccf5e1"}, False)

with requests_mock.Mocker() as m:

url = self._client.config.url + disconnect.get_xpath()
m.get(url, content=XML_RESPONSE_DISCONNECT_GET)

resp = disconnect.get({"tndetail": "true"})
resp = disconnect.get("b902dee1-0585-4258-becd-5c7e51ccf5e1")
req = resp.order_request

self.assertEqual(req.id, "b902dee1-0585-4258-becd-5c7e51ccf5e1")
Expand Down
Loading