class_docstr: Tests for st.secrets with a single secrets.toml file
class_docstr_tok: ["Tests","for","st.secrets","with","a","single","secrets.toml","file"]
docstr: Verify that access to missing key via dict notation raises KeyError.
docstr_tok: ["Verify","that","access","to","missing","key","via","dict","notation","raises","KeyError","."]
code: def test_getitem_nonexistent(self, *mocks):
      """Verify that access to missing key via dict notation raises KeyError."""
      with self.assertRaises(KeyError):
          self.secrets["nonexistent_secret"]
  
      with self.assertRaises(KeyError):
          self.secrets["subsection"]["nonexistent_secret"]
  
imports: import os
  import tempfile
  import unittest
  from collections.abc import Mapping
  from collections.abc import MutableMapping
  from typing import Mapping, MutableMapping
  from unittest.mock import MagicMock, mock_open, patch
  from parameterized import parameterized
  from toml import TomlDecodeError
  from streamlit.runtime.secrets import SECRETS_FILE_LOCS, AttrDict, Secrets
  from tests.exception_capturing_thread import call_on_threads
label_desc: Use image node_id 14 for calling the SecretsTest obj's underlying member method code with example usage: obj.test_getitem_nonexistent() without return types