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

# Tests

> Run the test Algolia search Django package.

To run the tests,
find your Algolia application ID and admin API key in the Algolia dashboard.

```sh Command line icon=square-terminal theme={"system"}
ALGOLIA_APPLICATION_ID={APPLICATION_ID} ALGOLIA_API_KEY={ADMIN_API_KEY} tox
```

To override some settings for tests,
use the [settings method](https://docs.djangoproject.com/en/1.11/topics/testing/tools/#django.test.SimpleTestCase.settings):

```python Python icon=code theme={"system"}
class OverrideSettingsTestCase(TestCase):
    def setUp(self):
        with self.settings(
            ALGOLIA={"APPLICATION_ID": "foo", "API_KEY": "bar", "AUTO_INDEXING": False}
        ):
            algolia_engine.reset(settings.ALGOLIA)

    def tearDown(self):
        algolia_engine.reset(settings.ALGOLIA)

    def test_foo():
        # Your test function
        pass
```
