sigmavirus24: 2 things:

1. This is failing flake8 checks
2. This needs unittests
diff --git a/github3/github.py b/github3/github.py
index be5f5aab..9c61e4b9 100644
--- a/github3/github.py
+++ b/github3/github.py
@@ -78,6 +78,26 @@ class GitHub(GitHubCore):
         url = self._build_url('events')
         return self._iter(int(number), url, Event, etag=etag)
 
+    def all_organizations(self, number=-1, since=None, etag=None,
+                          per_page=None):
+        """Iterate over every organization in the order they were created.
+
+        :param int number: (optional), number of organizations to return.
+            Default: -1, returns all of them
+        :param int since: (optional), last organization id seen (allows
+            restarting this iteration)
+        :param str etag: (optional), ETag from a previous request to the same
+            endpoint
+        :param int per_page: (optional), number of organizations to list per
+            request
+        :returns: generator of :class:`Organization
+            <github3.orgs.Organization>`
+        """
+        url = self._build_url('organizations')
+        return self._iter(int(number), url, Organization,
+                          params={'since': since, 'per_page': per_page},
+                          etag=etag)
+
     def all_repositories(self, number=-1, since=None, etag=None,
                          per_page=None):
         """Iterate over every repository in the order they were created.

Need a method to list all organizations on GitHub
https://developer.github.com/v3/orgs/#list-all-organizations was added recently. As a result we need to add `GitHub#all_organizations` to correspond with `GitHub#all_users`, `GitHub#all_events`, and `GitHub#all_repositories`.
diff --git a/tests/cassettes/GitHub_all_organizations.json b/tests/cassettes/GitHub_all_organizations.json
new file mode 100644
index 00000000..d379a91d
--- /dev/null
+++ b/tests/cassettes/GitHub_all_organizations.json
@@ -0,0 +1,1 @@
+{"http_interactions": [{"request": {"uri": "https://api.github.com/organizations?per_page=25", "method": "GET", "headers": {"Accept": "application/vnd.github.v3.full+json", "Accept-Charset": "utf-8", "Content-Type": "application/json", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "User-Agent": "github3.py/1.0.0a2"}, "body": {"string": "", "encoding": "utf-8"}}, "recorded_at": "2015-07-27T16:50:16", "response": {"url": "https://api.github.com/organizations?per_page=25", "headers": {"x-github-media-type": "github.v3; param=full; format=json", "content-type": "application/json; charset=utf-8", "x-github-request-id": "3EBD09C7:4121:BE664F4:55B66147", "x-served-by": "065b43cd9674091fec48a221b420fbb3", "x-ratelimit-remaining": "58", "transfer-encoding": "chunked", "access-control-expose-headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "x-frame-options": "deny", "content-security-policy": "default-src 'none'", "status": "200 OK", "x-xss-protection": "1; mode=block", "date": "Mon, 27 Jul 2015 16:50:16 GMT", "x-ratelimit-limit": "60", "etag": "W/\"467f85325c09d7c93ffa03581d0b7de5\"", "cache-control": "public, max-age=60, s-maxage=60", "content-encoding": "gzip", "access-control-allow-origin": "*", "link": "<https://api.github.com/organizations?per_page=25&since=2595>; rel=\"next\", <https://api.github.com/organizations{?since}>; rel=\"first\"", "x-ratelimit-reset": "1438017277", "access-control-allow-credentials": "true", "vary": "Accept", "x-content-type-options": "nosniff", "server": "GitHub.com", "strict-transport-security": "max-age=31536000; includeSubdomains; preload"}, "status": {"message": "OK", "code": 200}, "body": {"base64_string": "H4sIAAAAAAAAA63ay27jNhSA4VcR1G0QX+JbAhRdzKqLAsV00UVRDGiZlomhRIGi7BqDefceySJFyRrMIXF2gyD/yYQfaElU/vmWSpWLMv1IudZnzXn6kopT+rHZvKSNlvD1izFV/bFYsEq85sJcmuNrpoqF0nm9GBrNK1V/QReL7vvhZ/ErL01I+AigLHhx5Dok7Ytvi8c/vsOQqjlKkX0JnzUO/ZHsygzT06Xovlj3C9jUXGeqNPCrd2vZLDab366/vsF/6MTrTIvKCAUmZSPl9xePqAQqfmf61CsdViglP0NDuSjCamhjuIaaRGwYR4x2WM2hpalPVohS1EbfM7Dmmlu41eodIzdTY/2mabji04QIy6cZFKJPQ4ldAWcOdrobMyUlz4y4cnHirN+Rq/UBA/vUYlnHYTjqpI8gnUygAJ2MpOZcH+Y40795cmyEPCW1Opsb0zwxCv4trzzRnMmk0uooeVG/jja0yjNLjbtGPgKsL3x3OGobRUi2GQVfO4faDHdB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BXBnB5VoKLDeMnOp99tS5uy3593+CzYb+GisAAA==", "string": "", "encoding": "utf-8"}}}], "recorded_with": "betamax/0.4.2"}
\ No newline at end of file
diff --git a/tests/integration/test_github.py b/tests/integration/test_github.py
index 11067a7f..d27eb229 100644
--- a/tests/integration/test_github.py
+++ b/tests/integration/test_github.py
@@ -169,6 +169,13 @@ class TestGitHub(IntegrationHelper):
 
         assert isinstance(i, github3.issues.Issue)
 
+    def test_all_organizations(self):
+        """Test the ability to iterate over all of the organizations."""
+        cassette_name = self.cassette_name('all_organizations')
+        with self.recorder.use_cassette(cassette_name):
+            for r in self.gh.all_organizations(number=25):
+                assert isinstance(r, github3.orgs.Organization)
+
     def test_all_repositories(self):
         """Test the ability to iterate over all of the repositories."""
         cassette_name = self.cassette_name('iter_all_repos')
diff --git a/tests/unit/test_github.py b/tests/unit/test_github.py
index dd98da37..8c7e10ca 100644
--- a/tests/unit/test_github.py
+++ b/tests/unit/test_github.py
@@ -317,6 +317,40 @@ class TestGitHubIterators(UnitIteratorHelper):
             headers={}
         )
 
+    def test_all_organizations(self):
+        """Show that one can iterate over all organizations."""
+        i = self.instance.all_organizations()
+        self.get_next(i)
+
+        self.session.get.assert_called_once_with(
+            url_for('organizations'),
+            params={'per_page': 100},
+            headers={}
+        )
+
+    def test_all_organizations_per_page(self):
+        """Show that one can iterate over all organizations with per_page."""
+        i = self.instance.all_organizations(per_page=25)
+        self.get_next(i)
+
+        self.session.get.assert_called_once_with(
+            url_for('organizations'),
+            params={'per_page': 25},
+            headers={}
+        )
+
+    def test_all_organizations_since(self):
+        """Show that one can limit the organizations returned."""
+        since = 100000
+        i = self.instance.all_organizations(since=since)
+        self.get_next(i)
+
+        self.session.get.assert_called_once_with(
+            url_for('organizations'),
+            params={'per_page': 100, 'since': since},
+            headers={}
+        )
+
     def test_all_repositories(self):
         """Show that one can iterate over all repositories."""
         i = self.instance.all_repositories()

pip install -e .[test]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
betamax==0.9.0
betamax-matchers==0.4.0
certifi==2025.1.31
charset-normalizer==3.4.1
coverage==7.8.0
exceptiongroup==1.2.2
execnet==2.1.1
-e git+https://github.com/sigmavirus24/github3.py.git@95b8f36b296dc58954b053f88fe34a408944a921#egg=github3.py
idna==3.10
iniconfig==2.1.0
packaging==24.2
pluggy==1.5.0
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-xdist==3.6.1
requests==2.32.3
requests-toolbelt==1.0.0
tomli==2.2.1
typing_extensions==4.13.0
uritemplate==4.1.1
uritemplate.py==3.0.2
urllib3==2.3.0

name: github3.py
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - betamax==0.9.0
      - betamax-matchers==0.4.0
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - coverage==7.8.0
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - idna==3.10
      - iniconfig==2.1.0
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - requests==2.32.3
      - requests-toolbelt==1.0.0
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - uritemplate==4.1.1
      - uritemplate-py==3.0.2
      - urllib3==2.3.0
prefix: /opt/conda/envs/github3.py

tests/integration/test_github.py::TestGitHub::test_all_organizations tests/unit/test_github.py::TestGitHubIterators::test_all_organizations tests/unit/test_github.py::TestGitHubIterators::test_all_organizations_per_page tests/unit/test_github.py::TestGitHubIterators::test_all_organizations_since
tests/integration/test_github.py::TestGitHub::test_update_me
tests/integration/test_github.py::TestGitHub::test_all_events tests/integration/test_github.py::TestGitHub::test_all_repositories tests/integration/test_github.py::TestGitHub::test_all_users tests/integration/test_github.py::TestGitHub::test_authorize tests/integration/test_github.py::TestGitHub::test_create_gist tests/integration/test_github.py::TestGitHub::test_create_issue tests/integration/test_github.py::TestGitHub::test_create_key tests/integration/test_github.py::TestGitHub::test_create_repository tests/integration/test_github.py::TestGitHub::test_emojis tests/integration/test_github.py::TestGitHub::test_feeds tests/integration/test_github.py::TestGitHub::test_followers tests/integration/test_github.py::TestGitHub::test_followers_of tests/integration/test_github.py::TestGitHub::test_gist tests/integration/test_github.py::TestGitHub::test_gitignore_template tests/integration/test_github.py::TestGitHub::test_gitignore_templates tests/integration/test_github.py::TestGitHub::test_is_following tests/integration/test_github.py::TestGitHub::test_is_starred tests/integration/test_github.py::TestGitHub::test_issue tests/integration/test_github.py::TestGitHub::test_me tests/integration/test_github.py::TestGitHub::test_meta tests/integration/test_github.py::TestGitHub::test_non_existent_gitignore_template tests/integration/test_github.py::TestGitHub::test_notifications tests/integration/test_github.py::TestGitHub::test_notifications_all tests/integration/test_github.py::TestGitHub::test_octocat tests/integration/test_github.py::TestGitHub::test_organization tests/integration/test_github.py::TestGitHub::test_pull_request tests/integration/test_github.py::TestGitHub::test_rate_limit tests/integration/test_github.py::TestGitHub::test_repositories tests/integration/test_github.py::TestGitHub::test_repositories_by tests/integration/test_github.py::TestGitHub::test_repository tests/integration/test_github.py::TestGitHub::test_repository_with_id tests/integration/test_github.py::TestGitHub::test_search_code tests/integration/test_github.py::TestGitHub::test_search_code_with_text_match tests/integration/test_github.py::TestGitHub::test_search_issues tests/integration/test_github.py::TestGitHub::test_search_repositories tests/integration/test_github.py::TestGitHub::test_search_repositories_with_text_match tests/integration/test_github.py::TestGitHub::test_search_users tests/integration/test_github.py::TestGitHub::test_search_users_with_text_match tests/integration/test_github.py::TestGitHub::test_user tests/integration/test_github.py::TestGitHub::test_user_teams tests/integration/test_github.py::TestGitHub::test_user_with_id tests/integration/test_github.py::TestGitHub::test_zen tests/unit/test_github.py::TestGitHub::test_authorization tests/unit/test_github.py::TestGitHub::test_authorize tests/unit/test_github.py::TestGitHub::test_can_login_without_two_factor_callback tests/unit/test_github.py::TestGitHub::test_check_authorization tests/unit/test_github.py::TestGitHub::test_create_gist tests/unit/test_github.py::TestGitHub::test_create_key tests/unit/test_github.py::TestGitHub::test_create_key_requires_a_key tests/unit/test_github.py::TestGitHub::test_create_key_requires_a_title tests/unit/test_github.py::TestGitHub::test_create_repository tests/unit/test_github.py::TestGitHub::test_emojis tests/unit/test_github.py::TestGitHub::test_follow tests/unit/test_github.py::TestGitHub::test_follow_requires_a_username tests/unit/test_github.py::TestGitHub::test_gist tests/unit/test_github.py::TestGitHub::test_gitignore_template tests/unit/test_github.py::TestGitHub::test_gitignore_templates tests/unit/test_github.py::TestGitHub::test_is_following tests/unit/test_github.py::TestGitHub::test_is_starred tests/unit/test_github.py::TestGitHub::test_is_starred_requires_a_repo tests/unit/test_github.py::TestGitHub::test_is_starred_requires_an_owner tests/unit/test_github.py::TestGitHub::test_issue tests/unit/test_github.py::TestGitHub::test_issue_requires_positive_issue_id tests/unit/test_github.py::TestGitHub::test_issue_requires_repository tests/unit/test_github.py::TestGitHub::test_issue_requires_username tests/unit/test_github.py::TestGitHub::test_me tests/unit/test_github.py::TestGitHub::test_repository tests/unit/test_github.py::TestGitHub::test_repository_with_id tests/unit/test_github.py::TestGitHub::test_repository_with_id_accepts_a_string tests/unit/test_github.py::TestGitHub::test_repository_with_id_requires_a_positive_id tests/unit/test_github.py::TestGitHub::test_repository_with_invalid_repo tests/unit/test_github.py::TestGitHub::test_repository_with_invalid_user tests/unit/test_github.py::TestGitHub::test_repository_with_invalid_user_and_repo tests/unit/test_github.py::TestGitHub::test_two_factor_login tests/unit/test_github.py::TestGitHub::test_update_me tests/unit/test_github.py::TestGitHub::test_user tests/unit/test_github.py::TestGitHub::test_user_with_id tests/unit/test_github.py::TestGitHub::test_user_with_id_accepts_a_string tests/unit/test_github.py::TestGitHub::test_user_with_id_requires_a_positive_id tests/unit/test_github.py::TestGitHubIterators::test_all_events tests/unit/test_github.py::TestGitHubIterators::test_all_repositories tests/unit/test_github.py::TestGitHubIterators::test_all_repositories_per_page tests/unit/test_github.py::TestGitHubIterators::test_all_repositories_since tests/unit/test_github.py::TestGitHubIterators::test_all_users tests/unit/test_github.py::TestGitHubIterators::test_all_users_per_page tests/unit/test_github.py::TestGitHubIterators::test_all_users_since tests/unit/test_github.py::TestGitHubIterators::test_authorizations tests/unit/test_github.py::TestGitHubIterators::test_emails tests/unit/test_github.py::TestGitHubIterators::test_followed_by tests/unit/test_github.py::TestGitHubIterators::test_followers tests/unit/test_github.py::TestGitHubIterators::test_followers_of tests/unit/test_github.py::TestGitHubIterators::test_followers_require_auth tests/unit/test_github.py::TestGitHubIterators::test_following tests/unit/test_github.py::TestGitHubIterators::test_following_require_auth tests/unit/test_github.py::TestGitHubIterators::test_gists tests/unit/test_github.py::TestGitHubIterators::test_gists_by tests/unit/test_github.py::TestGitHubIterators::test_issues tests/unit/test_github.py::TestGitHubIterators::test_issues_on tests/unit/test_github.py::TestGitHubIterators::test_issues_on_with_params tests/unit/test_github.py::TestGitHubIterators::test_issues_with_params tests/unit/test_github.py::TestGitHubIterators::test_keys tests/unit/test_github.py::TestGitHubIterators::test_notifications tests/unit/test_github.py::TestGitHubIterators::test_notifications_all tests/unit/test_github.py::TestGitHubIterators::test_notifications_participating_in tests/unit/test_github.py::TestGitHubIterators::test_organization_issues tests/unit/test_github.py::TestGitHubIterators::test_organization_issues_with_params tests/unit/test_github.py::TestGitHubIterators::test_organizations tests/unit/test_github.py::TestGitHubIterators::test_organizations_with tests/unit/test_github.py::TestGitHubIterators::test_public_gists tests/unit/test_github.py::TestGitHubIterators::test_repositories_by tests/unit/test_github.py::TestGitHubIterators::test_repositories_by_with_type tests/unit/test_github.py::TestGitHubIterators::test_respositories tests/unit/test_github.py::TestGitHubIterators::test_respositories_accepts_params tests/unit/test_github.py::TestGitHubIterators::test_starred tests/unit/test_github.py::TestGitHubIterators::test_starred_by tests/unit/test_github.py::TestGitHubIterators::test_subscriptions tests/unit/test_github.py::TestGitHubIterators::test_subscriptions_for tests/unit/test_github.py::TestGitHubIterators::test_user_issues tests/unit/test_github.py::TestGitHubIterators::test_user_issues_with_parameters tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_authorization tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_authorizations tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_create_issue tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_create_key tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_create_repository tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_emails tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_follow tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_gists tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_is_following tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_is_starred tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_issues tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_keys tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_me tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_notifications tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_organization_issues tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_organizations tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_repositories tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_starred tests/unit/test_github.py::TestGitHubRequiresAuthentication::test_user_issues tests/unit/test_github.py::TestGitHubAuthorizations::test_revoke_authorization tests/unit/test_github.py::TestGitHubAuthorizations::test_revoke_authorizations
github3/github.py
github3/github.py