forked from gimlithepirate/python-github2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_organizations.py
More file actions
33 lines (24 loc) · 1.12 KB
/
Copy pathtest_organizations.py
File metadata and controls
33 lines (24 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import _setup
from nose.tools import (assert_equals, assert_true)
import utils
class OrganizationProperties(utils.HttpMockTestCase):
def test_is_authenticated(self):
organization = self.client.organizations.show('github')
assert_true(organization.is_authenticated() is False)
organization = self.client.organizations.show('fake_org_with_auth')
assert_true(organization.is_authenticated() is True)
class Organization(utils.HttpMockTestCase):
def test_repr(self):
organization = self.client.organizations.show('github')
assert_equals(repr(organization),
'<Organization: github>')
class OrganizationQueries(utils.HttpMockTestCase):
"""Test organisation querying"""
def test_public_repositories(self):
repos = self.client.organizations.public_repositories('github')
assert_equals(len(repos), 26)
assert_equals(repos[2].name, 'hubahuba')
def test_public_members(self):
members = self.client.organizations.public_members('github')
assert_equals(len(members), 33)
assert_equals(members[2].name, 'Ben Burkert')