Пример #1
0
    def test_get_num_of_repos_no_private_repos(self, mock_get_json, *_):

        org = Organization('org_name')

        mock_get_json.return_value = {model.PUBLIC_REPOS: 2}

        self.assertEqual(Organization.get_num_of_repos(org), 2)
Пример #2
0
    def test_get_num_of_repos(self, mock_get_json, *_):
        org = Organization('org_name')

        mock_get_json.return_value = {model.PUBLIC_REPOS: 2,
                                      model.TOTAL_PRIVATE_REPOS: 3}

        self.assertEqual(Organization.get_num_of_repos(org), 5)