1
1
# -*- coding: utf-8 -*-
2
2
3
- """pytest Licenses functions, fixtures and tests ."""
3
+ """pytest Organizations API wrapper tests and fixtures ."""
4
4
5
5
6
6
import pytest
10
10
11
11
# Helper Functions
12
12
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 )
15
15
16
16
17
17
def get_organization_by_id (api , orgId ):
@@ -29,7 +29,7 @@ def are_valid_organizations(iterable):
29
29
30
30
@pytest .fixture (scope = "session" )
31
31
def organizations_list (api ):
32
- return list_organizations ( api )
32
+ return list ( get_list_of_organizations ( api ) )
33
33
34
34
35
35
# Tests
@@ -42,6 +42,6 @@ def test_list_organizations(self, organizations_list):
42
42
43
43
def test_get_organization_by_id (self , api , organizations_list ):
44
44
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