def test_org(self, org, mock):
     """ Method that test GithubOrgClient.org
         and returns the correct value
     """
     TestClass = GithubOrgClient(org)
     TestClass.org()
     mock.assert_called_once_with(f'https://api.github.com/orgs/{org}')
 def test_org(self, organization: str, mock: unittest.mock.patch):
     """
     Test the org request
     :return: Nothing
     """
     test_class = GithubOrgClient(organization)
     test_class.org()
     mock.assert_called_once_with(
         f'https://api.github.com/orgs/{organization}')
    def test_org(self, input, mock):
        """ Test the organization

            args:
                input: Name of the org
                mock: Mock
        """
        test_class = GithubOrgClient(input)
        test_class.org()
        mock.assert_called_once_with(f'https://api.github.com/orgs/{input}')
예제 #4
0
 def test_org(self, org_name, mock_json):
     """ returns correct output """
     gc = GithubOrgClient(org_name)
     gc.org()
     mock_json.assert_called_once_with(
         f"https://api.github.com/orgs/{org_name}")
예제 #5
0
 def test_org(self, data, mock):
     ''' self descriptive '''
     endpoint = 'https://api.github.com/orgs/{}'.format(data)
     spec = GithubOrgClient(data)
     spec.org()
     mock.assert_called_once_with(endpoint)
예제 #6
0
 def test_org(self, name, mock):
     """ Method that tests org function """
     gitcli = GithubOrgClient(name)
     gitcli.org()
     mock.assert_called_once_with(f'https://api.github.com/orgs/{name}')
예제 #7
0
 def test_org(self, input, mock):
     """Test that GithubOrgClient.org"""
     test_class = GithubOrgClient(input)
     test_class.org()
     mock.assert_called_once_with(f'https://api.github.com/orgs/{input}')