def test_get_or_retrieve_for_api_key_djstripe_owner_account_exists(
        self, account, request, platform_account_fixture, configure_settings
    ):
        """Ensure that djstripe_owner_account is returned correctly when it already exists on the api_key."""

        new_account = Account.get_or_retrieve_for_api_key(
            settings.STRIPE_TEST_SECRET_KEY
        )
        assert (
            platform_account_fixture[1].djstripe_owner_account
            == new_account.djstripe_owner_account
        )
Ensure that djstripe_owner_account is returned correctly when it already exists on the api_key.
tests/test_account.py