class_docstr: Credentials Class Unittest class.
docstr: Test that saving a new Credential sends an email
code: def test_email_send(self, temp_dir):
      """Test that saving a new Credential sends an email"""
  
      with requests_mock.mock() as m:
          m.post("https://api.segment.io/v1/t", status_code=200)
          creds: Credentials = Credentials.get_current()  # type: ignore
          creds._conf_file = str(Path(temp_dir.path) / "config.toml")
          creds.activation = _verify_email("email@test.com")
          creds.save()
          last_request = m.request_history[-1]
          assert last_request.method == "POST"
          assert last_request.url == "https://api.segment.io/v1/t"
          assert '"userId": "email@test.com"' in last_request.text
  
imports: import os
  import textwrap
  import unittest
  from pathlib import Path
  from unittest.mock import MagicMock, call, mock_open, patch
  import pytest
  import requests_mock
  from testfixtures import tempdir
  from streamlit import file_util
  from streamlit.runtime.credentials import Credentials, _Activation, _verify_email, email_prompt
label_desc: Use image node_id 20 for calling the CredentialsClassTest obj's underlying member method code with example usage: obj.test_email_send(temp_dir) without return types