def test_sync_from_stripe_data(self, platform_account_fixture, configure_settings):
        """Ensure sync_from_stripe_data() on Account model works as expected."""

        # Create Account on Stripe.
        account_json = stripe.Account.create(
            type="standard",
            country="US",
            email="jenny.standard.rosen@example.com",
            api_key=settings.STRIPE_TEST_SECRET_KEY,
        )
        try:
            account_instance = Account.sync_from_stripe_data(
                account_json, api_key=settings.STRIPE_TEST_SECRET_KEY
            )

            assert account_instance.id == account_json["id"]
            assert account_instance.type == account_json["type"]
            assert account_instance.email == account_json["email"]

        except Exception:
            raise

        # deleted created Account
        finally:
            # try to delete
            stripe.Account.delete(
                account_json["id"], api_key=settings.STRIPE_TEST_SECRET_KEY
            )
Ensure sync_from_stripe_data() on Account model works as expected.
tests/test_account.py