Skip to content

Commit ada0883

Browse files
committed
Refactor test_organizations.py
1 parent a7be9a0 commit ada0883

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/api/test_organizations.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
"""pytest Licenses functions, fixtures and tests."""
3+
"""pytest Organizations API wrapper tests and fixtures."""
44

55

66
import pytest
@@ -10,8 +10,8 @@
1010

1111
# Helper Functions
1212

13-
def list_organizations(api, max=None):
14-
return list(api.organizations.list(max=max))
13+
def get_list_of_organizations(api, max=None):
14+
return api.organizations.list(max=max)
1515

1616

1717
def get_organization_by_id(api, orgId):
@@ -29,7 +29,7 @@ def are_valid_organizations(iterable):
2929

3030
@pytest.fixture(scope="session")
3131
def organizations_list(api):
32-
return list_organizations(api)
32+
return list(get_list_of_organizations(api))
3333

3434

3535
# Tests
@@ -42,6 +42,6 @@ def test_list_organizations(self, organizations_list):
4242

4343
def test_get_organization_by_id(self, api, organizations_list):
4444
assert len(organizations_list) >= 1
45-
org_id = organizations_list[0].id
46-
org = get_organization_by_id(api, orgId=org_id)
47-
assert is_valid_organization(org)
45+
organization_id = organizations_list[0].id
46+
organization = get_organization_by_id(api, orgId=organization_id)
47+
assert is_valid_organization(organization)

0 commit comments

Comments
 (0)