> ## Documentation Index
> Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# TestMaximCoreSimple

> Test Maxim Core Simple functionality for Tests integration.

[View module source on GitHub](https://github.com/maximhq/maxim-py/blob/main/maxim/tests/test_maxim_core_simple.py)

## [FalsyCache](/sdk/python/references/tests/test_maxim_core_simple)

```python theme={null}
class FalsyCache(MaximCache)
```

A cache that evaluates to False but is not None - used to test the 'cache is not None' fix.

## [TestMaximCacheHandling](/sdk/python/references/tests/test_maxim_core_simple)

```python theme={null}
class TestMaximCacheHandling(unittest.TestCase)
```

Test the cache handling changes, specifically the 'if cache is not None:' fix.

#### setUp

```python theme={null}
def setUp()
```

Set up test fixtures.

#### tearDown

```python theme={null}
def tearDown()
```

Clean up after tests.

#### test\_enable\_prompt\_management\_with\_none\_cache

```python theme={null}
def test_enable_prompt_management_with_none_cache()
```

Test enable\_prompt\_management with cache=None.

#### test\_enable\_prompt\_management\_with\_falsy\_cache

```python theme={null}
def test_enable_prompt_management_with_falsy_cache()
```

Test enable\_prompt\_management with a cache that evaluates to False but is not None.

This tests the fix from 'if cache:' to 'if cache is not None:'.
Previously, a falsy cache would not be used even if it was a valid cache object.

#### test\_enable\_prompt\_management\_with\_valid\_cache

```python theme={null}
def test_enable_prompt_management_with_valid_cache()
```

Test enable\_prompt\_management with a normal valid cache.

#### test\_enable\_prompt\_management\_starts\_sync\_thread

```python theme={null}
def test_enable_prompt_management_starts_sync_thread()
```

Test that enable\_prompt\_management starts the sync thread.

#### test\_enable\_exceptions\_method\_chaining

```python theme={null}
def test_enable_exceptions_method_chaining()
```

Test enable\_exceptions method returns self for chaining.

## [TestMaximInitialization](/sdk/python/references/tests/test_maxim_core_simple)

```python theme={null}
class TestMaximInitialization(unittest.TestCase)
```

Test [Maxim](/sdk/python/references/maxim) initialization and configuration.

#### setUp

```python theme={null}
def setUp()
```

Set up test fixtures.

#### tearDown

```python theme={null}
def tearDown()
```

Clean up after tests.

#### test\_maxim\_requires\_api\_key

```python theme={null}
def test_maxim_requires_api_key()
```

Test that [Maxim](/sdk/python/references/maxim) requires an API key.

#### test\_maxim\_uses\_env\_api\_key

```python theme={null}
def test_maxim_uses_env_api_key()
```

Test that [Maxim](/sdk/python/references/maxim) uses environment variable for API key.

#### test\_maxim\_singleton\_pattern

```python theme={null}
def test_maxim_singleton_pattern()
```

Test that [Maxim](/sdk/python/references/maxim) follows singleton pattern.

#### test\_maxim\_default\_cache\_creation

```python theme={null}
def test_maxim_default_cache_creation()
```

Test that [Maxim](/sdk/python/references/maxim) creates default cache when none provided.

#### test\_cleanup\_method\_stops\_running

```python theme={null}
def test_cleanup_method_stops_running()
```

Test that cleanup method properly sets is\_running to False.

#### test\_cleanup\_prevents\_double\_execution

```python theme={null}
def test_cleanup_prevents_double_execution()
```

Test that cleanup method can be called multiple times safely.

## [TestGetConfigDict](/sdk/python/references/tests/test_maxim_core_simple)

```python theme={null}
class TestGetConfigDict(unittest.TestCase)
```

Test the get\_config\_dict function.

#### test\_get\_config\_dict\_with\_config\_object

```python theme={null}
def test_get_config_dict_with_config_object()
```

Test get\_config\_dict function with [Config](/sdk/python/references/maxim) object.

#### test\_get\_config\_dict\_with\_dict

```python theme={null}
def test_get_config_dict_with_dict()
```

Test get\_config\_dict function with dictionary.
