Skip to content

Commit 01588d2

Browse files
committed
Removed unnecessary test, added requirements, updated circleci config
1 parent aa92281 commit 01588d2

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

.circleci/config.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
docker:
99
# specify the version you desire here
1010
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
11-
- image: circleci/python:3.6.1
11+
- image: circleci/python:2.7.17
1212

1313
# Specify service dependencies here if necessary
1414
# CircleCI maintains a library of pre-built images
@@ -30,7 +30,7 @@ jobs:
3030
- run:
3131
name: install dependencies
3232
command: |
33-
python3 -m venv venv
33+
virtualenv venv
3434
. venv/bin/activate
3535
pip install -r requirements.txt
3636
@@ -53,3 +53,6 @@ jobs:
5353
- store_artifacts:
5454
path: test-reports
5555
destination: test-reports
56+
57+
- store_test_results:
58+
path: test-reports

dynatademand/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def __init__(self):
1212
raise DemandAPIError("All authentication data is required.")
1313
self._access_token = None
1414
self._refresh_token = None
15-
self.base_host = os.getenv('DYNATA_DEMAND_BASE_URL', 'https://api.researchnow.com')
15+
self.base_host = os.getenv('DYNATA_DEMAND_BASE_URL', default='https://api.researchnow.com')
1616
self.auth_base_url = '{}/auth/v1'.format(self.base_host)
1717
self.base_url = '{}/sample/v1'.format(self.base_host)
1818

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pytest==5.2.3
2+
pytest-runner==5.2
3+
requests==2.22.0
4+
responses==0.10.6

tests/test_authentication.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,6 @@ def test_missing_password(self, mock_getenv):
4949
with self.assertRaises(DemandAPIError):
5050
DemandAPIClient()
5151

52-
@patch('os.getenv')
53-
def test_missing_base_url(self, mock_getenv):
54-
mock_getenv.side_effect = [
55-
"test_client_id",
56-
"test_username",
57-
"test_password",
58-
None
59-
]
60-
with self.assertRaises(DemandAPIError):
61-
DemandAPIClient()
62-
6352

6453
def api_test_url(endpoint):
6554
return "{}{}".format(BASE_URL, endpoint)

0 commit comments

Comments
 (0)